Avibra uses the OAuth 2.0 Client Credentials Grant flow to obtain an access_token, which is then used to make REST API calls.
💡Implementing the OAuth 2.0 Client Credentials Grant involves a series of steps where a client application requests an access token directly from the authorization server using its own credentials, without user involvement. This flow is typically used for machine-to-machine (M2M) applications.General Steps:
1
Obtain OAuth 2.0 Credentials:
Avibra will provide partner with Client ID, Client Secret and Scope.
2
Request an Access Token:
The client sends a POST request to the authorization server's token endpoint with the following parameters:
grant_type=client_credentials
client_id=your_client_id
client_secret=your_client_secret
scope=scope
3
Receive Access Token:
If the credentials are valid, the authorization server responds with an access token.
4
Access Protected Resources:
Use the access token to authenticate API requests to protected resources by including it in the Authorization header:​