curl -c cookies.txt \
-H "Content-Type: application/json" \
-d '{"username":"myshop","password":"secret"}' \
https://apitest.tunimobile.com/v1/login_check
{
"status": 1,
"id": 123,
"user": "My Shop",
"username": "myshop",
"role": "ROLE_SHOP",
"roles": ["ROLE_SHOP", "ROLE_USER", "ROLE_ADD_CREDIT_REQUEST"],
"code": "SH-0123",
"avatar": "/images/avatars/123.webp",
"themeConfig": null,
"isVerified": true,
"hasAttachments": true,
"isPhoneVerified": true,
"phoneVerificationRequired": false
}
{ "code": 401, "message": "Invalid credentials." }
Authentication
Log in
Log the user in and set the BEARER and refresh_token cookies.
curl -c cookies.txt \
-H "Content-Type: application/json" \
-d '{"username":"myshop","password":"secret"}' \
https://apitest.tunimobile.com/v1/login_check
{
"status": 1,
"id": 123,
"user": "My Shop",
"username": "myshop",
"role": "ROLE_SHOP",
"roles": ["ROLE_SHOP", "ROLE_USER", "ROLE_ADD_CREDIT_REQUEST"],
"code": "SH-0123",
"avatar": "/images/avatars/123.webp",
"themeConfig": null,
"isVerified": true,
"hasAttachments": true,
"isPhoneVerified": true,
"phoneVerificationRequired": false
}
{ "code": 401, "message": "Invalid credentials." }
Public endpoint. On success, the response sets the
BEARER and refresh_token cookies (see Authentication). The tokens are not in the body.
This response is not wrapped in the standard envelope.
Body
string
required
Account username.
string
required
Account password.
Response
integer
1 on success.integer
User id.
string
Display name.
string
Account username.
string
Main role, depends on the account type. Integrations use
ROLE_SHOP accounts.string[]
All roles of the account.
boolean
true once the account documents are approved.boolean
true if the account has uploaded its documents.boolean
Phone verification state of the account.
boolean
true if the user must verify their phone.Errors
| HTTP | Body | Meaning |
|---|---|---|
401 | {"code": 401, "message": "Invalid credentials."} | Wrong username or password |
401 | {"code": 401, "message": "Your user account no longer active."} | Account disabled |
403 | {"code": 403, "message": "User is not active"} | Account disabled |
curl -c cookies.txt \
-H "Content-Type: application/json" \
-d '{"username":"myshop","password":"secret"}' \
https://apitest.tunimobile.com/v1/login_check
{
"status": 1,
"id": 123,
"user": "My Shop",
"username": "myshop",
"role": "ROLE_SHOP",
"roles": ["ROLE_SHOP", "ROLE_USER", "ROLE_ADD_CREDIT_REQUEST"],
"code": "SH-0123",
"avatar": "/images/avatars/123.webp",
"themeConfig": null,
"isVerified": true,
"hasAttachments": true,
"isPhoneVerified": true,
"phoneVerificationRequired": false
}
{ "code": 401, "message": "Invalid credentials." }