Tokens¶
Get new token¶
/token/
| method | GET |
| Auth | NO |
Input vars
| Parameter | Type | Description |
|---|---|---|
| soc_id | string | If user trying to authorize via social network network soc_id must be provided |
| login | string | Login or email |
| password | string | Password |
Response
| Parameter | Type | Description |
|---|---|---|
| token | string | Token |
| ttl | timestamp | Date to token invalidation |
{
"status": "ok",
"response":
{
"token": "sf6df5s7dfcsd6f5cs6d5fc6s5df6s5cdfs6f5",
"ttl": 1443780969
}
}
Invalidate token¶
Logging out user
/token/invalidate/
| method | GET |
| Auth | YES |
Input vars
| Parameter | Type | Description |
|---|---|---|
| user_id | integer | User Id |
Response
| Parameter | Type | Description |
|---|---|---|
| result | 1 or 0 | |
| error | string | Not empty if error occurred |