Description and Details

  • This endpoint is used to exchange an authorization code (received after successful user consent authorization) for an access token and optionally a refresh token. It is part of the OAuth 2.0 Authorization Code flow.


Endpoint

https://api-dev-isolution.xyz/opentest/token

Verb Method

POST


Headers Request Parameters

 KeyValueRequiredDescription
Content-Typeapplication/x-www-form-urlencodedYesSpecifies the encoding of the request body
Acceptapplication/jsonOptionalExpected response format
AuthorizationBasic {base64(client_id:client_secret)}YesClient authentication via Basic Auth

Body Request Parameters
 

ParameterTypeRequiredDescription
grant_typestringYesMust be authorization_code
codestringYesThe authorization code received from the authorize endpoint
redirect_uristringYesMust match the redirect URI used in the authorize request
client_idstringYesThe client ID assigned to your application
client_secretstringYesThe client secret assigned to your application

Response Parameters

ParameterTypeDescription
access_tokenstringToken used for accessing protected resources
token_typestringType of token (typically "Bearer")
expires_inintegerLifetime of the token in seconds
refresh_tokenstringToken used to refresh access token (optional)
scopestringScopes associated with the token

HTTP Codes

CodeMeaning
200OK – Token issued successfully
400Bad Request – Missing or invalid parameters
401Unauthorized – Invalid client credentials or auth code
500Internal Server Error