Authenticate user through FS service for mobile
Implementation Notes: This API requires a secure connection, passing password as a plain text. Also, application/json input in body is preferable. If login contains no domain, the configured one is added. If server returns HTTP error 400 with code=526 then valid captcha/captcha_id params are required to proceed.
POST /api/v1/auth/login
HTTP/1.1 200 OK
- Request fields
| Path | Type | Description |
|---|---|---|
login | String | FS login string. |
password | String | FS password string. |
captcha | String | Captcha value from user input. Not required. |
captcha_id | String | Captcha id obtained from /api/v1/auth/captcha request. Not required. |
- Response structure
| Path | Type | Description |
|---|---|---|
token | String | User’s token for session. |
- Example request
curl -XPOST 'https://coapi-stand.devoffice.ru/api/v1/auth/login' -H 'Content-Type: application/json;charset=UTF-8' -d '{
"login":"login@myoffice.ru",
"password":"password_for_user"
}'
- Example response
HTTP/1.1 200 OK
Content-Length: 162
Content-Type: application/json
{
"token" : "O3232hw1p0Bx2gY2bFZ",
"success" : "true"
}