Skip to main content
Version: 2.0.0

Token Request

POST   https://api.apptenticate.com/api/token/

When you make a request to this endpoint, you will get a JWT and you can use it for authentication against Apptenticate services. The token lasts for 5 minutes.

Request data

FieldTypeDescription
usernamestringUsername
passwordstringPassword

Request example

Request
curl --location 'https://api.apptenticate.com/api/token/' \
--form 'username="<username>"' \
--form 'password="<password>"'

Response data

FieldTypeDescription
refreshstringRefresh token to obtain a new JWT access token
accessstringJWT access token

Example of a successful response

status_code 200
{
"refresh": "eyJhbGciOiJJ0b2tlbl90eXBlI6IkpXVCJ9.eyJ0b2tlbl90eXBlI...",
"access": "eyJhbGciOiJJ0b2tlbl90eXBlI6IkpXVCJ9.eyJ0b2tlbl90eXBlIj..."
}

Example of a failed response

status_code 401
{
"detail": "No active account found with the given credentials"
}