Authenticate a user by code
POST /api/2.0/authentication/{code}
Request
Authenticates the current user by SMS or two-factor authentication code.
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
.
Path
- code
string
required
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/%7Bcode%7D 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/%7Bcode%7D \
--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
403
Auth code is not available
429
Too many login attempts. Please try again later