Getting Started in PHP
This is a Getting Started document on how to programatically use the API. For more detailed information, read through the rest of the API documentation.
Download the Sample Code
The sample code is located at https://github.com/iMeetCentral/api-php. You can download or clone the code from there.
This is just a simple application demonstrating a command-line client to the iMeet Central API implementing a few functions. It is not intended to be a library or a full application, but it is a good place to get started before creating your own project.
Generate a key pair
The first thing to be done is to authenticate the application. Since there is no UI to enter a password, it must be done with keys. The first step is to get a private/public key pair.
In iMeet Central, go to Company Setup > Advanced > API. Select a user from the “Act as” dropdown that has the necessary permissions to everything you need in the API. Click “Click New Client Key” or “Regenerate Client Key” if you have created a key previously. This will cause the browser to download a JSON file containing the private key and the client ID.

Go back to the sample code and open api-php/config/client_config.yml. Enter the private key and client ID from the downloaded JSON file into this config file.
Run the Sample Project
If running the first time, make sure you run:
composer install
Try a few commands to verify that things are working.
php ./bin/cd.php auth:token
php ./bin/cd.php users:list
More documentation is available in the README.
Examine the code
Now that the sample project is working, it is necessary to examine the tools it provides in order for you to create your own project.
Config Options
- config/config.yml::auth.cd.auth_url: URL of iMeet Central Identity server
- config/config.yml::auth.cd.issuer: Name of iMeet Central Identity server
- config/config.yml::auth.cd.scp: Requested scope for access token (always “cd.user”)
- config/config.yml::auth.cd.grant_type: Sent in JWT bearer token request
- config/config.yml::edge.base_url: Base URL of all requests to the iMeet Central API
- config/client_config.yml::client_id: Unique ID representing a client project interacting with the iMeet Central API
- config/client_config.yml::client_key: Private key used to sign the JWT bearer token
Get Access Token
This function retrieves an access token. If the access token does not yet exist or has expired, a JWT bearer token is created, signed by the private key, and then sent to the iMeet Central Identity server. If this token is verified an access token will be returned.
This class represents the access token returned by the iMeet Central Identity server. Access tokens expire. So, it is important to call isFresh() if using this class directly.
Use Access Token
$token = self::getAuthToken();
$stack->push(Middleware::mapRequest(function (RequestInterface $r) use ($token) {
return $r->withHeader('Authorization', 'Bearer ' . $token->accessToken);
}, 'oauth_bearer'));
First, an access token is retrieved. And then this access token is sent as an HTTP header to every request to the iMeet Central API. This access token represents that the request is authenticated and that it has a certain set of permissions and represents a certain user. All API requests must contain this HTTP header.
Make calls to the API
Most list commands to the iMeet Central API support pagination. The initial request will contain a size limit. If the total size of the response contains more elements than the limit, then paging options are returned (first, next, prev, and last).
These links can be used to page through the results in various directions or skip ahead directly to the first or last page.
The sample code uses the “next” link in the response and a number of pages parameter to scroll through a list of results and return the entire result set.
This function returns the iMeet Central API being requested. The PagintationCommand::execute function calls get_endpoint to generate a URL for the HTTP request.
Upload a file
A locally stored file is opened and is uploaded in the body of an HTTP request. The Content-Disposition HTTP header with either the “filename” or “filename*” parameters (or both) parameters are required.
Uploading a file is an advanced topic and is described more in-depth in File Upload.