/token/obtain Authenticate and obtain an access token
Endpoint
Copy https://be.progeny.tech/api/v3/accounts/token/obtain/
Purpose
Allows you to exchange the username and password provided by Progeny, for an access token and refresh token.
To access API endpoints that require authentication, you should include the access token in the header of all requests.
Sample request and response
Exchange username and password for a token
POST
https://be.progeny.tech/api/v3/accounts/token/obtain/
Request Body
200: OK Success 401: Unauthorized Unauthorized 400: Bad Request Bad request
Copy {
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY0OTg3MzI0NywianRpIjoiN2YxZjBjNWFhNWNmNGY1NTg5ZWQ0NGMzYWRjZjRmZmEiLCJ1c2VyX2lkIjo0MX0.7sN29T5abguGOGR3dmwxNfVJZcMxE9qDSxFcYXIKYEc",
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjQ4NjYzOTQ3LCJqdGkiOiJhMjg3MmQ4ZmIzY2Y0NTVkYWE3ZmRiMWVmZmZjM2UzZSIsInVzZXJfaWQiOjQxfQ.L4GXorALzmFOuu-NnyumEY7SbQum4kCdAQJ3QolGbqc"
}
Copy {
"detail" : "No active account found with the given credentials"
}
Copy {
"password" : [
"This field is required."
]
}
The "access" token used to make API calls is only valid for five minutes. To obtain a new access token without having to re-enter username/password, use the /refresh endpoint.
Get a new access token
POST
https://be.progeny.tech/api/v3/accounts/token/refresh/
Request Body
200: OK Success 401: Unauthorized Unauthorized
Copy {
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjQ4NjY0NTQzLCJqdGkiOiI3YjkwYTgwMWU2ZGI0OTY4YTJmYTc3NmI1NmUzNDJkMCIsInVzZXJfaWQiOjQxfQ.-FPwOlMLX4WqGsJmmeY74F9R7EldudpvNnxO65hyeTw",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY0OTg3Mzg0MywianRpIjoiZGY2YTdhNmViMTlkNGE5YWE1ZTg1NTAwZWMwMDYyNGMiLCJ1c2VyX2lkIjo0MX0.FKJnVtXGyWu5_5s4TAHOuoF0iW8TmDe-Chcnt4XcWq0"
}
Copy {
"detail" : "Token is invalid or expired" ,
"code" : "token_not_valid"
}