Token
POST
/api/v1/oauth/token
const url = 'https://example.com/api/v1/oauth/token';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ grant_type: 'example', code: 'example', code_verifier: 'example', redirect_uri: 'example', client_id: 'example', client_secret: 'example', refresh_token: 'example', device_code: 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/oauth/token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=example \ --data code=example \ --data code_verifier=example \ --data redirect_uri=example \ --data client_id=example \ --data client_secret=example \ --data refresh_token=example \ --data device_code=exampleRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/x-www-form-urlencoded
Body_token_api_v1_oauth_token_post
object
Examplegenerated
grant_type=example&code=example&code_verifier=example&redirect_uri=example&client_id=example&client_secret=example&refresh_token=example&device_code=exampleResponses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}