API Credentials
How to authenticate with the API
- Client ID
- Client Secret
- API Key
These can all be found on the RateIt Portal on the API Credentials page under the Settings tab (only visible to Super Users). Please note that the Client Secret and API Key are both things that once generated, cannot be seen again, so make sure you store them in a safe place. You can always revoke and regenerate the secret and key, but it will make the old ones invalid. Also, all three of these items are company wide meaning they are the same for every user of the portal and if one user revokes the secret or key, it will revoke it for everyone.
Requesting an authorisation token
Example Request
POST /token HTTP/1.1 Host: api.rateitapp.com Content-Type: application/x-www-form-urlencoded Authorization: Basic BASE64_ENCODED_CLIENTID_CLIENTSECRET grant_type=api_key&api_key=API_KEY
Example Response
{ access_token": "ACCESS_TOKEN", "token_type": "bearer", "expires_in": 1799, "claims": "ClientId=CLIENT_ID, ApiKey=API_KEY, OTHER_CLAIMS", ".issued": "Tue, 01 Jan 2018 12:00:00 GMT", ".expires": "Tue, 01 Jan 2018 12:30:00 GMT" }
Requesting a resource
GET /api/v1/your/ratings?start=2018-01-01 HTTP/1.1 Host: api.rateitapp.com Authorization: Bearer ACCESS_TOKEN
Paging results
When you are retrieving more than 1000 ratings, you will need to make multiple requests. This will hit the one request per minute limit however. To get around this, in the first successful response, it will include a continuationToken. This will need to be included in the next request as a URL parameter where the key is the words continuationToken and the value is the value from the first response. Please note that you will also need to increase the skip URL parameter to 1000 (to skip the first 1000 ratings and get the next 1000). For more information about the URL parameters, click here.