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
| Parameter | Type | Constraints | Description | Example |
|---|---|---|---|---|
| login | string | Required | Username in the partner system | example@email.com |
| password | string | Required | Password in the partner system | qwerty123 |
| provider | string | Required | Partner name | simple_one |
Partners
simple_one– Company SimpleOne
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
| Parameter | Type | Description |
|---|---|---|
| access | string | Access token |
| refresh | string | Refresh 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"
}