Communico provides access to client data via a suite of APIs. You will need the client’s keyword and a valid access token for all requests.
The Communico API uses OAuth 2.0 http://oauth.net/2/ for authentication. To generate a valid authorization header you will need an API key and secret. If you have not been provided with authentication credentials please contact support@communico.co.
An access token can be generated by making a request to https://api.communico.co/v3/token with a valid authorization header.
POST /token HTTP/1.1
Host: api.communico.co
Authorization: Basic HtdjYy3Se2E3Ddf845j4TFh44ktE
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Body
grant_type=client_credentials
If your credentials are valid, an access token will be returned as part of the response:
{
"access_token":"e29d7da8ac0279a2f186859e6dc0c3ba9d7bf0d8",
"token_type":"Bearer",
"expires_in":3600,
"scope":"EVENTS"
}
You can extract the access_token and token_type values from this response and then include them in Communico API calls as part of the "Authorization" HTTP header, as shown in the example below:
GET /v3/attend/events?startDate=2016-11-01&endDate=2016-11-31&start=0&limit=10&status=published
Host: api.communico.co
Authorization: Bearer e29d7da8ac0279a2f186859e6dc0c3ba9d7bf0d8
User-Agent: Your App Here
This is an example of making a request to the the Communico Client API to get a list of events from the Communico database.
GET /v3/attend/events?startDate=2016-11-01&endDate=2016-11-31&start=0&limit=10&status=published
Host: api.communico.co
Authorization: Bearer {OAuth token}
Returned is a JSON array of events from the given time period.
201 Created
Pragma: no-cache
X-Frame-Options: deny
Content-Length: 506
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Tue, 12 Dec 2015 14:32:24 GMT
Expires: -1
Location: /v3/attend/events?startDate=2016-11-01&endDate=2016-11-31&start=0&limit=10&status=published
{
"status": "success",
"code": 200,
"data": {
"total": 3,
"start": 0,
"limit": 10,
"startDate": "2016-11-01",
"endDate": "2016-11-31",
"entries": [
{
"eventId": 8890,
"recurringId": 3565,
"status": "published",
"title": "Testing checkbox questions",
"shortDescription": "Agree",
"description": "",
"eventStart": "2016-11-10 09:00:00",
"eventEnd": "2016-11-10 10:00:00",
"locationId": 342,
"locationName": "Falltown",
"roomId": 31,
"roomName": "Meeting room A"
},...
]
}
}