OAuth2 Authorization Endpoint
GET
/oauth2/authorize
const url = 'https://api.example.com/oauth2/authorize?response_type=code&client_id=example&redirect_uri=https%3A%2F%2Fexample.com&code_challenge_method=S256';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.example.com/oauth2/authorize?response_type=code&client_id=example&redirect_uri=https%3A%2F%2Fexample.com&code_challenge_method=S256'Initiates the OAuth2 authorization flow using the Authorization Code grant with PKCE (S256).
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”response_type
required
string
Must be set to code for Authorization Code flow or OTP.
client_id
required
string
The client application’s identifier.
redirect_uri
required
string format: uri
URI to redirect back to after authorization.
scope
string
Space-separated scopes requested by the client.
state
string
Opaque value to maintain state between request and callback.
code_challenge
string
For public clients, code challenge derived from the code verifier (PKCE).
code_challenge_method
string
For public clients, the code challenge method, must be ‘S256’.
Responses
Section titled “Responses”Redirect to the client’s redirect URI with authorization code.
Invalid request parameters.