Description and Details

  • This API endpoint is used in the OAuth 2.0 Authorization Code flow. It allows the user to authorize a specific access consent using a one-time password (OTP). Once authorized, the authorization server issues an authorization code, which can be exchanged for an access token. This flow ensures that the user has explicitly approved third-party access to their account data or functionality.


Endpoint

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

Verb Method

GET


Headers Request Parameters

Header KeyValueRequiredDescription
Content-Typeapplication/jsonOptionalIndicates content type (mostly not needed for GET)
Acceptapplication/jsonOptionalExpected response format
User-AgentCustom stringOptionalBrowser or client info (default in browsers)

Body Request Parameters
 

ParameterTypeRequiredDescription
client_idstringYesThe registered application's client ID
statestringYesA unique value to maintain session state and prevent CSRF
redirect_uristringYesThe URI to which the user will be redirected after approval
response_typestringYesShould be code (for authorization code flow)
scopestringYesDefines the level of access requested (e.g., read)
consent_idstringYesThe unique identifier of the user's access consent
otpstringYesThe one-time password used to validate the user session

Response Parameters

ParameterTypeDescription
codestringAuthorization code issued by the authorization server. Used to request token.
statestringThe same state value sent in the request. Used to maintain session integrity.

HTTP Codes

CodeMeaning
302Found – Redirect to redirect_uri with code
400Bad Request – Missing or invalid parameters
401Unauthorized – Invalid OTP or expired consent
403Forbidden – Consent not permitted
500Internal Server Error