Appearance
GET /users/[ID]
Description
Retrieve the details of your user account. When calling the collection endpoint GET /users/, only your own user account (the one associated with the access token) is returned.
Authentication
- Required: Yes
- Method: Bearer token
Request Headers
- Authorization:
Bearer [AUTH_TOKEN] - Accept:
application/json(for JSON responses)application/xml(for XML responses)
Parameters
Query Parameters
- format:
string(Optional)
Values:json,xml
Overrides the Request Accept header. - human:
boolean(Optional)
Values:true,false
Causes the response to be in a structured, more human-readable form. - show_null:
boolean(Optional)
Values:true,false
If set to "true", the response will contain keys that are not set to a value.
Example Request
bash
curl -X GET "https://api.xvid.com/v1/users/547f3eede4b025bcbff38655?human=true&show_null=true" \
-H "Authorization: Bearer AUTH_TOKEN"Example Response
Success (200 OK)
GET /users/ID returns a single user object:
json
{
"user": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"password": "*******",
"client_password_salt": "*******",
"name": "johnny",
"billing_address": {
"company_name": "ACME Corp",
"street": "45 Desert Boulevard",
"city": "Albuquerque",
"country": "United States",
"zip_code": "87101"
},
"profile": {
"avatarURL": "http://www.gravatar.com/avatar/4589972CB656F09FD314B5ECF865402E",
"profileURL": "http://www.gravatar.com/4589972CB656F09FD314B5ECF865402E"
},
"settings": {
"language": "en",
"time_zone": "Europe/London",
"show_location_flag": true,
"newsletter_flag": false,
"default_payment": "PayPal account john.doe@example.com"
},
"confirmed_on": 1417625420989,
"version": 1,
"created_at": 1417625325570,
"updated_at": 1626777024403,
"id": "547f3eede4b025bcbff38655",
"href": "https://api.xvid.com/v1/users/547f3eede4b025bcbff38655"
}
}GET /users/ (collection endpoint) returns a users array — containing only your own user — plus pagination fields:
json
{
"users": [
{
"first_name": "John",
"last_name": "Doe",
"email": "jdoe@acme.com",
"password": "*******",
"client_password_salt": "*******",
"name": "johnny22",
"billing_address": {
"company_name": "Sparrow Ltd",
"vat_id": "123456789",
"street": "Mathura Road 8b",
"city": "London",
"state": "London",
"country": "United Kingdom",
"zip_code": "CWFT5Z",
"vat_id_verified": null,
"company_email": null
},
"profile": {
"website": null,
"short_bio": null,
"avatarURL": "http://www.gravatar.com/avatar/4589972CB656F09FD314B5ECF865402E",
"profileURL": "http://www.gravatar.com/4589972CB656F09FD314B5ECF865402E"
},
"setting": {
"location": null,
"language": null,
"time_zone": "Europe/London",
"show_location_flag": null,
"newsletter_flag": true,
"notification_email": null,
"default_payment": "Visa ending in *** 7918"
},
"confirmed_on": 1417625420989,
"changed_email_confirmed": null,
"version": 1,
"created_at": 1416677045882,
"updated_at": 1416677045882,
"id": "5470c6b5e4b09edbcfd16235",
"href": "https://api.xvid.com/v1/users/5470c6b5e4b09edbcfd16235"
}
],
"total": 1,
"start": 0,
"limit": 1000,
"first": {
"href": "https://api.xvid.com/v1/users/?start=0&limit=1000&human=true&show_null=true"
},
"last": {
"href": "https://api.xvid.com/v1/users/?start=0&limit=1000&human=true&show_null=true"
},
"next": {
"href": "https://api.xvid.com/v1/users/?start=0&limit=1000&human=true&show_null=true"
},
"prev": {
"href": "https://api.xvid.com/v1/users/?start=0&limit=1000&human=true&show_null=true"
}
}Error Responses
400 Bad Request
json
{
"error": {
"error_code": "0x0010001",
"error_message": "Invalid Input"
}
}403 Forbidden
json
{
"error": {
"error_code": "0x0000003",
"error_message": "Invalid access token"
}
}500 Internal Server Error
json
{
"error": {
"error_code": "0x0000001",
"error_message": "Internal Error"
}
}