/oauth2/authorize (GET)
const url = 'https://gymgym.club/api/auth/oauth2/authorize?client_id=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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://gymgym.club/api/auth/oauth2/authorize?client_id=example' \ --header 'Authorization: Bearer <token>'Authorize an OAuth 2.1 request from query parameters or an application/x-www-form-urlencoded POST body
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”OAuth 2.1 response type (e.g., ‘code’)
OAuth 2.1 client ID
OAuth 2.1 redirect URI
OAuth 2.1 scopes (space-separated)
OAuth 2.1 state parameter
Pushed Authorization Request URI referencing stored parameters
PKCE code challenge
PKCE code challenge method
OpenID Connect nonce
Maximum authentication age in seconds; forces re-authentication when exceeded
Requested protected resource(s) for the access token. May be supplied multiple times as repeated ‘resource’ query parameters (RFC 8707) or as an array of strings.
OAuth2 prompt parameter
Responses
Section titled “Responses”Redirect to client with code or error
Headers
Section titled “Headers”Redirect URI with code or error
Invalid request
object
Examplegenerated
{ "error": "example", "error_description": "example", "state": "example"}Unauthorized. Due to missing or invalid authentication.
object
Examplegenerated
{ "message": "example"}Forbidden. You do not have permission to access this resource or to perform this action.
object
Examplegenerated
{ "message": "example"}Not Found. The requested resource was not found.
object
Examplegenerated
{ "message": "example"}Too Many Requests. You have exceeded the rate limit. Try again later.
object
Examplegenerated
{ "message": "example"}Internal Server Error. This is a problem with the server that you cannot fix.
object
Examplegenerated
{ "message": "example"}