Skip to main content
Version: Next

Authorization via External Provider

This method allows a user to log into the system using credentials from a partner system.
On first login, a user account will be created.
If the partner system provides email and phone number data, they will be linked to the account.

Request Parameters

POST /api/clients/v1/auth/loginExternal/

Headers

  • Content-Type: application/json

JSON body

ParameterTypeConstraintsDescriptionExample
loginstringRequiredUsername in the partner systemexample@email.com
passwordstringRequiredPassword in the partner systemqwerty123
providerstringRequiredPartner namesimple_one

Partners

note

The login field uses the username from the partner system.
Depending on the provider, this might be a username, email address, phone number, etc.

Response Parameters

JSON body

ParameterTypeDescription
accessstringAccess token
refreshstringRefresh token

Examples

200 OK

JWT token pair

{
"refresh": "eyJ0eXAiOiJKV1QiLJhCbGOiciJIUz1NIiJ9.eyJ0b2tlbl90eXBlIjoicmVmcaCmVzIsV4ImcCI6MTcxNTQxzMNzkSwianRpIjoiQ0ZGJZGlZDc3NzMwNDQ1ZjliM2Y4ZTc2MTA5YjFhMWQiLCJ1c2VyX2lkIjo0fQ.VBKIBnhYHgGxGRQvXwM2X2TY1_FVXBW0aZiGeO215Fk",
"access": "eyJ0eXAiOiJKV1QiLJhCbGOiciJIUz1NIiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZIiXNzwihwZXIjoxNzEzNjg5xLOTMCJqdGkiOiI1Q3Y2JMmjYWEwOTI0NDMyOTJhZDM2NGVlOTE5NjRjOSIsInVzZXJfaWQiOjR9.7SOVohFO8utkBjPuePvoAqTk1eLwO5Fdn26UjqWip_8"
}
401 Unauthorized

Invalid login/password pair

{
"detail": "No active account found with provided credentials and provider"
}
503 Service Unavailable

Provider service is unavailable

{
"detail": "Service unavailable"
}