Auth - Check
Check status of an authentication session.
https://api.vid.me/auth/check
Permission: none
curl -X POST -H "AccessToken: abcdef0123456789" https://api.vid.me/auth/check
Global Headers
| Field | Type | Description |
|---|---|---|
| AccessToken | String |
The user authentication token. May use token parameter instead.
|
Global Parameters
| Field | Type | Description |
|---|---|---|
| token | String |
The user authentication token. May use AccessToken header instead.
|
| DEVICE optional | String |
The device UUID
|
| PLATFORM optional | String |
The device platform (ios|android|web)
|
Success 200
| Field | Type | Description |
|---|---|---|
| status | Boolean |
Whether or not this request succeeded
|
| auth | Object |
Auth data
|
| token | String |
The user authentication token
|
| expires | String |
The date at which the token expires
|
| user_id | String |
The user ID of the authentication token
|
| user | Object |
User data
|
| user_id | String |
The user ID
|
| username | String |
The unique username
|
| full_url | String |
The full URL to the user's profile
|
| avatar | String |
The avatar url on the CDN
|
| avatar_url | String |
The full avatar url
|
| cover | String |
The cover photo url on the CDN
|
| cover_url | String |
The full cover photo url
|
| video_views | String |
The number of views on all of the user's videos
|
| likes_count | String |
The number of likes on all of the user's videos
|
HTTP/1.1 200 OK
{
"status" : true,
"auth" : {
"token" : "fedcba9876543210fedcba9876543210",
"expires" : "1543-01-01 13:33:37",
"user_id" : "1234"
},
"user" : {
"user_id" : "1234",
"username" : "foo",
"avatar" : "avatars\/1234.jpg?v3r1400000000"
}
}
Error 4xx
| Field | Type | Description |
|---|---|---|
| status | Boolean |
true for success, false for failure
|
| error | String |
An error message explaining the error
|
| code | String |
An error code
|
HTTP/1.1 405 Method Not Allowed
{
"status" : false,
"error" : "Method not allowed",
"code" : "method_not_allowed"
}