API Authentication
The partner, who is making the API requests, must include a specific type of header, called the "authorisation header", in each request they make. The header should contain a unique token, called a "bearer access token". This token serves as a form of authentication, verifying that the request is coming from a legitimate and authorised source.
Prerequisites
client_id
A unique client id that is shared for each partner.
client_secret
A unique key that is auto-generated for each product configured for the partner.
API Description
Authentication API
POST https://qa-sso.vida.id/auth/realms/vida/protocol/openid-connect/token
Headers
Content-Type
Format type of request body
Request Body
grant_type*
String
Valid grant type for this method will be client_credentials
scope
String
client_id*
String
An identifier of the client that is provided by VIDA.
client_secret*
String
A secret is known only by the client and VIDA authentication service.
API Responses
Access Token Generated
The input parameters are correct and an access token is generated.
HTTP Status Code: 200
Unauthorised - Invalid Credentials
The client secret key parameter or its value is either missing or incorrect. The partner must check the client's secret key before sending the request.
HTTP Status Code: 401
Bad Request - Invalid or Missing Parameter(s)
The client id parameter or its value is either missing or incorrect. The partner must check the client id before sending the request.
HTTP Status Code: 400
Bad Request - Unsupported Grant Type
The grant type parameter or its value is either missing or incorrect.The partner must check the grant type before sending the request. Valid grant type: client_credentials.
HTTP Status Code: 400
Integration Code Snippets
Access Token Validity
Upon a successful API call, an access token and refresh token will be generated and sent in the response. The received JWT (JSON Web Token) token is required to authenticate all API requests for a limited time. Please refer to the below table for the access token validity period
Production
5 minutes
Sandbox
5 hours
Last updated
