6connect API - Getting Started with the SDK for PHP
The 6connect API allows you to access to data and functions of the 6connect web tools. The SDK for PHP will help you get this setup quickly by outlining the requirements, prerequisites and provide sample code.
Prerequisites
The API only comes with a licensed 6connect ProVision application. If you would like access to a ProVision license please contact sales@6connect.com.
Create Your API Credentials
To use the 6connect SDK for PHP, you will need a 6connect API Key and Secret Key.
To create your API Key and Secret Key:
- Log into your 6connect instance (hosted or local)
- Click on the Admin icon, and go into the Administration section.
- Click on the "API" tab.
- Select the user from the drop down you want to enable API access for, and click "Generate Keys".
- The API Key and the Secret Key will now appear directly below that.
*Note that generating a new API will automatically revoke an older API Key.
Important!
Requirements
Aside from following the prerequisites, you will need a basic understanding of object oriented programming in PHP and the right tools installed on your system to use the API.
Minimum Requirements
- PHP 5.5 or newer.
- PHP JSON and PCRE extensions (XML will be coming soon).
- Curl PHP extension compiled with OpenSSL libraries. Click here for more information on curl.
If you aren't sure what is running on your system, you can create a php page on your system and call phpinfo() and view this page in a browser, or run php -i on the command line.
Install the SDK
Download the file
Configure the SDK Security Credentials
- Extract the zipped tar file to a directory.
- Open the api-config.php located in the downloaded SDK files.
- Read through the file and place in your instance name (or path for local installs), API Key and Secret Key information as specified.
- Make sure all files are in the same directory (the core class looks for a config file in the same directory by default).
- Run the sample code api-examples.php!
Important!
You must setup user API access before running the sample. See the previous section "Create Your API Credentials" for more information.
Need More Information?
If you need more general information on the API, try the API Overview.
If you need information on methods available via the API, look at the API Reference.
The SDK also contains a README file with other useful information particular to php.