The EX.CO Reports API attempt to conform to the REST design principle. EX.CO Reports API support the JSON data format for responses and in some cases, when requested, CSV.
NOTE: All API requests must be made over HTTPS. Calls made over HTTP are not allowed.
API Reference
The EX.CO API uses API tokens to authenticate API calls. Use provided ACCOUNT_ID
and ACCOUNT_SECRET
to get an access token. This API token will be expired after a short period of time, we recommend generating a new API token before any API call.
Authentication API base URL:
https://authentication.playbuzz.com
POST /account/accessToken
The Access Token Object Parameters (BODY)
Property | Required | Description |
---|---|---|
accountId | Required | Your unique account ID |
accountSecret | Required | Your unique account secret |
grantType | Required | Authentication method. For API tokens use |
Example Request for an access token
- cURL
- Node.js
Example Response to a successful request
{ accountId: "ACCOUNT_ID", accessToken: "GENERATED_ACCESS_TOKEN" }
Use generated accessToken value in the Authorization
header on each API request:
Authorization: Bearer GENERATED_ACCESS_TOKEN x-pb-user-id: EXCO_USER_ID
HTTP Status Codes
EX.CO API's uses conventional HTTP response code types
Code | Type | Description |
---|---|---|
200 | OK | Everything worked as expected. |
400 | invalid_request_error | Handled programmatically depends report generation error |
401 | authentication_error |
|
401 | authentication_error |
|
403 | internal_service_error |
|
404 | internal_service_error |
|
500 | internal_service_error |
|
504 | api_error |
|
Versioning
API version is part of the URL structure of EX.CO API. To set the API version on a specific request, add the requested version like the following:
https://reports.ex.co/api/v1/
NOTE: Please read our API release notes before migrating into a newer version, some changes can be backward-incompatible.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article