Passer au contenu principal
POST
/
v2
/
private
/
user
/
login
Sign In
curl --request POST \
  --url https://api.crowdchange.dev/v2/private/user/login \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>",
  "method": "<string>",
  "mfa_code": "<string>"
}
'
{
  "token": "1|WQaSlvm1Gl8Pscq0e98K5MQPhiV8Q07CT9t8vR0N",
  "user_id": 10,
  "email": "a***n@crowdchange.co",
  "phone": "Campaign",
  "method": "Description",
  "active_methods": [
    "email",
    "sms",
    "authApplication"
  ]
}

Body

email
string
requis
User’s email.
password
string
requis
User’s password.
method
string
Method of 2FA. Required if the first login attempt asks to use 2FA. Allowed values: sms, email, authApplication
mfa_code
string
2FA code sent to user. Required if the first login attempt asks to use 2FA.

Response

token
string
Auth token to User-specific API. Presented if log in process is successful. Expired after 30 days if not used.
user_id
integer
User ID. Presented if log in process is successful.
email
string
Disguised user email. Presented if user needs to use 2FA and has email 2FA method.
phone
string
Disguised user Phone. Presented if user needs to use 2FA and has sms 2FA method.
method
string
Default 2FA method. Presented if user needs to use 2FA.
active_methods
any[]
Available 2FA methods to user. Presented if user needs to use 2FA.
Other responses
StatusDescription
401Unauthorized
403Forbidden
{
  "token": "1|WQaSlvm1Gl8Pscq0e98K5MQPhiV8Q07CT9t8vR0N",
  "user_id": 10,
  "email": "a***n@crowdchange.co",
  "phone": "Campaign",
  "method": "Description",
  "active_methods": [
    "email",
    "sms",
    "authApplication"
  ]
}