Skip to content

Login For Access Token

POST
/auth/token
curl --request POST \
--url http://localhost:8000/auth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=example \
--data client_secret=example \
--data grant_type=example \
--data password=example \
--data scope= \
--data username=example
Media typeapplication/x-www-form-urlencoded
Body_login_for_access_token_auth_token_post
object
client_id
Any of:
string
client_secret
Any of:
string
grant_type
Any of:
string
/^password$/
password
required
Password
string format: password
scope
Scope
string
""
username
required
Username
string

Successful Response

Media typeapplication/json
Token
object
access_token
required
Access Token
string
refresh_token
Any of:
string
token_type
required
Token Type
string
Examplegenerated
{
"access_token": "example",
"refresh_token": "example",
"token_type": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}