Authenticate a user
POST /api/2.0/authentication
Request
Authenticates the current user by SMS, authenticator app, or without two-factor authentication.
Headers
- Accept
enum of string
Can be one of:
application/json
,text/json
,text/plain
.- Content-Type
enum of string
Can be one of:
application/json
,application/*+json
,text/json
.
Body
Authentication request parameters
- userName
string
Username / email
- password
string
Password
- passwordHash
string
Password hash
- provider
string
Provider type
- accessToken
string
Provider access token
- serializedProfile
string
Serialized user profile
- code
string
Two-factor authentication code
- codeOAuth
string
Code for getting a token
- session
boolean
Session based authentication or not
- confirmData
object
- email
string
email Email address
- first
boolean
Access an account for the first time or not
- key
string
Key
- recaptchaType
one of
- .
enum of string
[Default - Default, AndroidV2 - AndroidV2, iOSV2 - iOSV2, hCaptcha - hCaptcha]
Can be one of:
Default
,AndroidV2
,iOSV2
,hCaptcha
.- .
enum of integer
[0 - Default, 1 - AndroidV2, 2 - iOSV2, 3 - hCaptcha]
Can be one of:
0
,1
,2
,3
.
- recaptchaResponse
string
reCAPTCHA response
- culture
string
Culture
Examples
POST /api/2.0/authentication HTTP/1.1
Accept: application/json
Content-Length: 423
Content-Type: application/json
Host: example.com
{
"userName": "some text",
"password": "044LP3vr2j",
"passwordHash": "some text",
"provider": "some text",
"accessToken": "some text",
"serializedProfile": "some text",
"code": "some text",
"codeOAuth": "some text",
"session": true,
"confirmData": {
"email": "Amanda.Ernser94@hotmail.com",
"first": true,
"key": "some text"
},
"recaptchaResponse": "some text",
"culture": "some text"
}
curl --request POST \
--url https://example.com/api/2.0/authentication \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"userName": "some text",
"password": "044LP3vr2j",
"passwordHash": "some text",
"provider": "some text",
"accessToken": "some text",
"serializedProfile": "some text",
"code": "some text",
"codeOAuth": "some text",
"session": true,
"confirmData": {
"email": "Amanda.Ernser94@hotmail.com",
"first": true,
"key": "some text"
},
"recaptchaResponse": "some text",
"culture": "some text"
}'
Responses
200
Authentication data
- token
string
Authentication token
- expires
string
date-time Token expiration time
- sms
boolean
Specifies if the authentication code is sent by SMS or not
- phoneNoise
string
Phone number
- tfa
boolean
Specifies if the two-factor application is used or not
- tfaKey
string
Two-factor authentication key
- confirmUrl
string
uri Confirmation email URL
400
userName, password or passworHash is empty
401
User authentication failed
404
The user could not be found
429
Too many login attempts. Please try again later