Skip to main content
POST
/
api
/
token
Create token
curl --request POST \
  --url http://localhost:8000/api/token/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "<string>",
  "password": "<string>"
}
'
{
  "access": "<string>",
  "refresh": "<string>"
}

Create Token

This endpoint generates a new token by providing your username and password.

Request Body

You must provide your username and password to obtain the token.
{
  "username": "string",
  "password": "string"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
username
string
required
password
string<password>
required

Response

Token generated successfully

access
string
refresh
string