Authentication
Observer Analytics API is available over the Internet and it uses Password grant type for issuing access tokens to client applications. Follow the information below to request an access token and use it to call the API endpoints defined in the Observer Analytics API Reference.
Request Access Token
When you have the following credentials, you are ready to requests the access token.
- App is created with Observer Analytics API.
- App has been promoted to Live.
- License ID and Secret is created.
Authorisation URLs
Refer to Internet URLs under Authorisation API Base URLs to determine the URL you should use whether you are trying out the APIs in the sandbox or using it in Live.
Authorization Header
Refer to Authorization Header to learn how to use the consumer-key and consumer-secret from the apps you created.
Request Body
Refer to Password grant type to learn the request parameters you should include in the API request.
Calling the authorisation API
Call the token API with the Authorization Header and request body explained above. An access token will be returned in the API response. The access_token is valid for 30 minutes. You can use the refresh_token for up to 24 hours.
Use Access Token
When you have obtained an access token, you can use access token to call Observer Analytics API. You also have the option to refresh access token after it expires. We highly recommend that you dispose access token when it is no longer needed.