cURL
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>" }
Generate a new token by providing a username and password
{ "username": "string", "password": "string" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Token generated successfully