OAuthTokenGenerationRequest is a JSON Structure definition published by Otter, describing 7 properties, of which 2 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-structure/public-api-oauth-token-generation-request-structure.json",
"name": "OAuthTokenGenerationRequest",
"description": "The entity to request a token, following the OAuth2.0 protocol.",
"type": "object",
"properties": {
"client_id": {
"type": "uuid",
"description": "The ID of the client (also known as the Application ID).",
"example": "c75d9460-5d48-423d-8d01-f825fd5b1672"
},
"client_secret": {
"type": "string",
"description": "The secret of the client.",
"example": "string"
},
"grant_type": {
"type": "string",
"description": "The OAuth2.0 grant types supported.",
"enum": [
"client_credentials",
"authorization_code"
],
"example": "client_credentials"
},
"scope": {
"type": "string",
"description": "The scope to request, multiple scopes are passed delimited by a space character.",
"example": "scope1 scope2"
},
"code": {
"type": "string",
"nullable": true,
"description": "The authorization code obtained from the server when performing the authorization code flow. It is required to exchange the code for an access token that will be used to perform actions on behalf of a user.",
"example": "8A9D16B4C3E25F6A"
},
"redirect_uri": {
"type": "string",
"nullable": true,
"description": "The redirect URI that was included in the initial authorization request. The value must be an exact match of the previously used URI, otherwise the request will be rejected.",
"example": "https://example.com/callback"
},
"code_verifier": {
"type": "string",
"nullable": true,
"description": "If the code_challenge parameter was included in the initial authorization requests, the application must now provide the code verifier. The value is the plaintext string that was used to calculate the hash that was previously sent in the code_challenge parameter.",
"example": "Th7UHJdLswIYQxwSg29DbK1a_d9o41uNMTRmuH0PM8zyoMAQ"
}
},
"required": [
"grant_type",
"scope"
]
}
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.