API Authentication

OAuth Authentication

OAuth authentication works by creating OAuth Credentials which have access to specific scopes, and then using those credentials to generate a token which is then valid for four hours which can then be used to call any of the API endpoints.

Step By Step

  1. Create OAuth Credentials in the dashboard, ensure that you securely store the client_id and client_secret that are created as you will not be able to retrieve the client_secret after it's initially created.

The scopes that are assigned to the credential are the only scopes that will be allowed in the subsequent token API call, so ensure to select all the scopes that you will require the credentials to have access to.

  1. Invoke the https://api.intelligent-api.com/v1/token endpoint (see ​Request a token) to generate an access_token, this token should be stored in a distributed cache or a database and should be updated every four hours.

The scopes that are supplied to this endpoint will determine whether or not the access token created will have access to the subsequent API endpoints, so ensure that you initially set the credentials to have access to the required scopes, and then list the required scopes when generating the token as well.

  1. All subsequent calls to the API should have an Authorization header added with the value set to the token passed in as a Bearer token, e.g. Bearer xxxxx.

To see examples of how to generate and use a token please visit the Code Examples repository or check out the Playground in the dashboard.