Users

Ask tech team
From QuickBlox Developers (API docs, code samples, SDK)
Jump to: navigation, search

Contents

Summary

The user module manages all things related to user accounts handling, authentication, account data, password reminding etc.

  • OAuth is secure and supports transparent authentication;
  • Password reminder and other typical user management tasks are managed automatically. Reminders and other technical messages are sent via Messages module;
  • Logging in users with their Facebook/Twitter accounts is available;
  • User tags – set up user tags and address them separately in your app or through the admin panel – supported by other modules such as Messages;
  • Existing user base integration – our module supports connection to your system by storing your existent IDs table and matching them to new ones.


Need to know information

Before using the Users module please read the following:



Users API

Requests and Responses

URL HTTP Verb Supported formats Action Description Success HTTP Status Code
/users GET
  • xml
  • json
Retrieve API Users for current account 200
/users POST
  • xml
  • json
API User Sign Up 201
/users/{user_id} GET
  • xml
  • json
Show API User by identifier 200
/users/by_login GET
  • xml
  • json
Retrieve API User by login 200
/users/by_full_name GET
  • xml
  • json
Retrieve API Users by full name 200
/users/by_facebook_id GET
  • xml
  • json
Retrieve API User by Facebook identifier 200
/users/by_twitter_id GET
  • xml
  • json
Retrieve API User by Twitter identifier 200
/users/by_email GET
  • xml
  • json
Retrieve API User by email 200
/users/by_tags GET
  • xml
  • json
Retrieve API Users By Tags 200
/users/{user_id} PUT
  • xml
  • json
Update API User by identifier 200
/users/{user_id} DELETE
  • xml
  • json
Delete API User by identifier 200
/users/external/{external_user_id} GET
  • xml
  • json
Retrieve API User by external user id 200
/users/external/{external_user_id} DELETE
  • xml
  • json
Delete API User by external user id 200
/users/password/reset GET
  • xml
  • json
Reset API User password by e-mail 200


Retrieve all Users for current account

Retrieve all API Users for current account.

Parameters

The request can contain all, some or none of these parameters.

Param Required Type Value Example Description
page No Unsigned Integer 3 Page number of the book of the results that you want to get. By default: 1
per_page No Unsigned Integer 15 The maximum number of results per page. Min: 1. Max: 100. By default: 10

Filters

The request can contain one of these filters.

Param Operator Allowed types Allowed fields Value Example Description
filter[] gt number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+gt+3 Will return users withs IDs greater than 3
filter[] lt number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+lt+34 Will return users withs IDs less than 34
filter[] ge number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+ge+445 Will return users withs IDs greater than or equal to 445
filter[] le number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+le+2241 Will return users withs IDs less than or equal 2241
filter[] eq number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+eq+3 Will return a user withs ID equal to 3
filter[] ne number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+ne+3 Will return users withs IDs not equal to 3
filter[] between number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+between
+3,2241
Will return users withs IDs between 3 and 2241
filter[] in number,string,date id,full_name,email,login,phone,website,created_at,updated_at,
last_request_at,external_user_id,twitter_id,facebook_id
number+id+in
+3,45,2241
Will return users withs IDs 3,45,2241

Sort

Param Possible values Allowed types Allowed fields Value Example Description
order asc/desc string/number/date id/full_name/email/login/phone/website/created_at/updated_at/
last_request_at/external_user_id/twitter_id/facebook_id
order=asc+date
+last_request_at
Sort by field

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: f1435baba523599662f3c5f125316073d112a5af" \
http://api.quickblox.com/users.json
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: d28fadea6fd9579c57430539b84a9a7e01e30633" \
http://api.quickblox.com/users.xml

Response

{
  "current_page": 1,
  "per_page": 10,
  "total_entries": 8,
  "items": [
    {
      "user": {
        "id": 87,
        "owner_id": 4,
        "full_name": "John Partizan",
        "email": "john@domain.com",
        "login": "Kitty",
        "phone": "7665891",
        "website": "http://partizan.com",
        "created_at": "2012-03-20T08:47:34Z",
        "updated_at": "2012-05-09T08:25:33Z",
        "last_request_at": "2012-05-08T13:07:37Z",
        "external_user_id": 158,
        "facebook_id": "1346987743",
        "twitter_id": "545878645453",
        "blob_id": null,
        "custom_data": null,
        "user_tags": "hello, world, hey"
      }
    },
  ...
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<users type="array" current_page="1" per_page="10" total_entries="28">
  <user>
    <blob-id type='integer' nil='true'/>
    <created-at type='datetime'>2012-01-16T11:49:08Z</created-at>
    <email>sunny@domain.com</email>
    <external-user-id type='integer' nil='true'/>
    <facebook-id nil='true'/>
    <full-name>Sunny</full-name>
    <id type='integer'>5</id>
    <last-request-at type='datetime'>2012-05-10T10:28:28Z</last-request-at>
    <login>Olesja</login>
    <owner-id type='integer'>4</owner-id>
    <phone nil='true'/>
    <twitter-id nil='true'/>
    <updated-at type='datetime'>2012-05-10T10:28:28Z</updated-at>
    <website nil='true'/>
    <custom-data nil='true'/>
    <user-tags>fruit, vegetable</user-tags>
  </user>
  ...
</users>


User Sign Up

API User sign up. Use for the identification of the mobile applications users. The request can contain all, some or none of the optional parameters. Login, email, facebook ID, twitter ID and the external user ID should not be taken previously. If you want to create a user with a some content (f.e. with a photo) you have to create a blob firstly. The same tags can be used for any number of users.
Please note that trailing whitespaces in string data (except password) will be trimmed.

Parameters

Param Required Type Value Example Description
user[login] Yes* String mylogin API User login
user[password] Yes String mypassword API User password
user[email] Yes* String superuser@domain.com API User e-mail
user[blob_id] Optional Integer 412 ID of associated blob (for example, API User photo)
user[external_user_id] Optional Integer 21445 ID of API User in external system
user[facebook_id] Optional Integer 1000041 ID of API User in Facebook
user[twitter_id] Optional Integer 200655 ID of API User in Twitter
user[full_name] Optional String Captain Jack Full name
user[phone] Optional String 144-556488 Phone
user[website] Optional String http://quickblox.com Website
user[custom_data] Optional String I'm at work now User's additional info
user[tag_list] Optional String tag1,tag2,tag3 Tags

* Only login OR email required

Request

curl -X POST \
-H "Content-Type: application/json" \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: cf5709d6013fdb7a6787fbeb8340afed8aec4c69" \
-d '{"user": {"login": "Lena", "password": "Lena", "email": "lena@domain.com", "external_user_id": "68764641", "facebook_id": "87964654", "twitter_id": "65765413614", "full_name": "Lena Laktionova", "phone": "87654351", "website": "http://lena.com", "tag_list": "name,age"}}' \
http://api.quickblox.com/users.json
curl -X POST \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 728d0dc46cb661c6b112eb022e614e950d62cef0" \
-d "user[login]=Flower&user[password]=Flower&user[email]=flower@domain.com&user[external_user_id]=7845636&user[facebook_id]=6357372&user[full_name]=Beautiful Flower&user[phone]=374257547&user[twitter_id]=67967327&user[website]=http://flower.com&user[tag_list]=type,name" \
http://api.quickblox.com/users.xml

Response

{
  "user": {
    "id": 1639,
    "owner_id": 4360,
    "full_name": "Lena Laktionova",
    "email": "lena@domain.com",
    "login": "Lena",
    "phone": "87654351",
    "website": "http://lena.com",
    "created_at": "2012-05-09T10:24:26Z",
    "updated_at": "2012-05-09T10:24:26Z",
    "last_request_at": "2012-05-09T10:24:26Z",
    "external_user_id": 68764641,
    "facebook_id": "87964654",
    "twitter_id": "65765413614",
    "blob_id": null,
    "custom_data": null,
    "user_tags": "name, age"
  }
}
<?xml version='1.0' encoding='UTF-8'?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-05-09T10:19:39Z</created-at>
  <email>flower@domain.com</email>
  <external-user-id type='integer'>7845636</external-user-id>
  <facebook-id>6357372</facebook-id>
  <full-name>Beautiful Flower</full-name>
  <id type='integer'>1635</id>
  <last-request-at type='datetime'>2012-05-09T10:19:39Z</last-request-at>
  <login>Flower</login>
  <owner-id type='integer'>4360</owner-id>
  <phone>374257547</phone>
  <twitter-id>67967327</twitter-id>
  <updated-at type='datetime'>2012-05-09T10:19:39Z</updated-at>
  <website>http://flower.com</website>
  <custom-data nil='true'/>
  <user-tags>type, name</user-tags>
</user>


Show API User by identifier

Show API User.

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 6f8c8931e80d0d828341ef218e95584ac48195db" \
http://api.quickblox.com/users/1326.json
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/1328.xml

Response

{
  "user": {
    "id": 1326,
    "owner_id": 4360,
    "full_name": "Sun Burn",
    "email": "sun@domain.com",
    "login": "Sun",
    "phone": "7665727",
    "website": "http://sun.com",
    "created_at": "2012-04-23T09:09:26Z",
    "updated_at": "2012-05-09T10:06:39Z",
    "last_request_at": "2012-05-09T10:04:50Z",
    "external_user_id": 28552,
    "facebook_id": "4561356",
    "twitter_id": "1653489",
    "custom_data": null,
    "blob_id": null,
    "user_tags": "type, volume, name"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-04-23T09:15:55Z</created-at>
  <email>cloud@domain.com</email>
  <external-user-id type='integer'>283452</external-user-id>
  <facebook-id>8526573</facebook-id>
  <full-name>Double Cloud</full-name>
  <id type='integer'>1328</id>
  <last-request-at type='datetime'>2012-04-23T09:15:55Z</last-request-at>
  <login>Cloud</login>
  <owner-id type='integer'>4360</owner-id>
  <phone>78767356</phone>
  <twitter-id>2376876</twitter-id>
  <updated-at type='datetime'>2012-04-23T09:15:55Z</updated-at>
  <website>http://cloud.com</website>
  <custom-data nil='true'/>
  <user-tags>type, volume</user-tags>
</user>


Retrieve API User by login

Search API User by login

Parameters

Param Required Type Value Example Description
login Yes String mylogin API User login

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 6f8c8931e80d0d828341ef218e95584ac48195db" \
http://api.quickblox.com/users/by_login.json?login=Flower
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/by_login.xml?login=Flower

Response

{
  "user": {
    "id": 1635,
    "owner_id": 4360,
    "full_name": "Beautiful Flower",
    "email": "flower@domain.com",
    "login": "Flower",
    "phone": "374257547",
    "website": "http://flower.com",
    "created_at": "2012-05-09T10:19:39Z",
    "updated_at": "2012-05-09T10:27:16Z",
    "last_request_at": "2012-05-09T10:27:16Z",
    "external_user_id": 7845636,
    "facebook_id": "6357372",
    "twitter_id": "67967327",
    "blob_id": null,
    "custom_data": null,
    "user_tags": "type, name"
  }
}
<?xml version='1.0' encoding='UTF-8'?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-05-09T10:19:39Z</created-at>
  <email>flower@domain.com</email>
  <external-user-id type='integer'>7845636</external-user-id>
  <facebook-id>6357372</facebook-id>
  <full-name>Beautiful Flower</full-name>
  <id type='integer'>1635</id>
  <last-request-at type='datetime'>2012-05-09T10:27:16Z</last-request-at>
  <login>Flower</login>
  <owner-id type='integer'>4360</owner-id>
  <phone>374257547</phone>
  <twitter-id>67967327</twitter-id>
  <updated-at type='datetime'>2012-05-09T10:27:16Z</updated-at>
  <website>http://flower.com</website>
  <custom-data nil='true'/>
  <user-tags>type, name</user-tags>
</user>


Retrieve API Users by full name

Search API Users by full name

Parameters

Param Required Type Value Example Description
full_name Yes String Mike Senior API User full name
page No Unsigned Integer 3 Page number of the book of the results that you want to get. By default: 1
per_page No Unsigned Integer 15 The maximum number of results per page. Min: 1. Max: 100. By default: 10

Request

curl -X GET 
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: c9c18b1a2e7768027458e594583ea1a434707203" \
http://api.quickblox.com/users/by_full_name.json?full_name=Double%20Cloud
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/by_full_name.xml?full_name=Double%20Cloud

Response

{
  "current_page": 1,
  "per_page": 10,
  "total_entries": 1,
  "items": [
    {
      "user": {
        "id": 796,
        "owner_id": 4,
        "full_name": "Double Cloud",
        "email": "cloud111@domain.com",
        "login": "Cloud111",
        "phone": "78767356",
        "website": "http://cloud.com",
        "created_at": "2012-05-09T09:33:05Z",
        "updated_at": "2012-05-09T09:33:05Z",
        "last_request_at": "2012-05-09T09:33:05Z",
        "external_user_id": 283312311,
        "facebook_id": "1852657311",
        "twitter_id": "2376876111",
        "blob_id": null,
        "custom_data": null,
        "user_tags": "aaa"
      }
    }
  ]
}
<?xml version='1.0' encoding='UTF-8'?>
<users type='array' current_page='1' per_page='10' total_entries='3'>
  <user>
    <blob-id type='integer' nil='true'/>
    <created-at type='datetime'>2012-05-09T08:47:41Z</created-at>
    <email>cloud@domain.com</email>
    <external-user-id type='integer'>283452</external-user-id>
    <facebook-id>8526573</facebook-id>
    <full-name>Double Cloud</full-name>
    <id type='integer'>781</id>
    <last-request-at type='datetime'>2012-05-09T08:47:41Z</last-request-at>
    <login>Cloud</login>
    <owner-id type='integer'>4</owner-id>
    <phone>78767356</phone>
    <twitter-id>2376876</twitter-id>
    <updated-at type='datetime'>2012-05-09T08:47:41Z</updated-at>
    <website>http://cloud.com</website>
    <custom-data nil='true'/>
    <user-tags>type, volume</user-tags>
  </user>
  ...
</users>


Retrieve API User by Facebook identifier

Search API User by Facebook identifier

Parameters

Param Required Type Value Example Description
facebook_id Yes Integer 10000445 API User Facebook ID

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: f1435baba523599662f3c5f125316073d112a5af" \
http://api.quickblox.com/users/by_facebook_id.json?facebook_id=1346987743
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: c9c18b1a2e7768027458e594583ea1a434707203" \
http://api.quickblox.com/users/by_facebook_id.xml?facebook_id=4561356

Response

{
  "user": {
    "id": 87,
    "owner_id": 4,
    "full_name": "John Partizan",
    "email": "john@domain.com",
    "login": "Kitty",
    "phone": "7665891",
    "website": "http://partizan.com",
    "created_at": "2012-03-20T08:47:34Z",
    "updated_at": "2012-05-10T09:21:19Z",
    "last_request_at": "2012-05-10T09:21:19Z",
    "external_user_id": 158,
    "facebook_id": "1346987743",
    "twitter_id": "545878645453",
    "blob_id": null,
    "custom_data": null,
    "user_tags": "hello, world, hey"
  }
}
<?xml version='1.0' encoding='UTF-8'?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-04-23T09:09:26Z</created-at>
  <email>sun@domain.com</email>
  <external-user-id type='integer'>28552</external-user-id>
  <facebook-id>4561356</facebook-id>
  <full-name>Sun Burn</full-name>
  <id type='integer'>1326</id>
  <last-request-at type='datetime'>2012-04-23T09:38:34Z</last-request-at>
  <login>Sun</login>
  <owner-id type='integer'>4360</owner-id>
  <phone>7665727</phone>
  <twitter-id>1653489</twitter-id>
  <updated-at type='datetime'>2012-04-23T09:38:34Z</updated-at>
  <website>http://sun.com</website>
  <custom-data nil='true'/>
  <user-tags>temperature, humidity, pressure</user-tags>
</user>


Retrieve API User by Twitter identifier

Retrieve API User by Twitter identifier

Parameters

Param Required Type Value Example Description
twitter_id Yes Integer 100500 API User Twitter ID

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: c9c18b1a2e7768027458e594583ea1a434707203" \
http://api.quickblox.com/users/by_twitter_id.json?twitter_id=123456
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/by_twitter_id.xml?twitter_id=1653489

Response

{
  "user": {
    "id": 798,
    "owner_id": 4,
    "full_name": "Ivan Tkachenko",
    "email": "ivan@domain.com",
    "login": "Ivan",
    "phone": "123123",
    "website": "http://ivan.com",
    "created_at": "2012-05-10T09:41:19Z",
    "updated_at": "2012-05-10T09:41:19Z",
    "last_request_at": "2012-05-10T09:41:19Z",
    "external_user_id": 123456,
    "facebook_id": "123456",
    "twitter_id": "123456",
    "blob_id": null,
    "custom_data": null,
    "user_tags": "university, department"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-04-23T09:09:26Z</created-at>
  <email>sun@domain.com</email>
  <external-user-id type='integer'>28552</external-user-id>
  <facebook-id>4561356</facebook-id>
  <full-name>Sun Burn</full-name>
  <id type='integer'>1326</id>
  <last-request-at type='datetime'>2012-04-23T09:38:34Z</last-request-at>
  <login>Sun</login>
  <owner-id type='integer'>4360</owner-id>
  <phone>7665727</phone>
  <twitter-id>1653489</twitter-id>
  <updated-at type='datetime'>2012-04-23T09:38:34Z</updated-at>
  <website>http://sun.com</website>
  <custom-data nil='true'/>
  <user-tags>temperature, humidity, pressure</user-tags>
</user>


Retrieve API User by email

Retrieve API User by email

Parameters

Param Required Type Value Example Description
email Yes String mike@senior.com API User email

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 61bbb37dee2b7547f647cc269c4083f1a1ce37a7" \
http://api.quickblox.com/users/by_email.json?email=ivan@domain.com
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/by_email.xml?email=sun@domain.com

Response

{
  "user": {
    "id": 798,
    "owner_id": 4,
    "full_name": "Ivan Tkachenko",
    "email": "ivan@domain.com",
    "login": "Ivan",
    "phone": "123123",
    "website": "http://ivan.com",
    "created_at": "2012-05-10T09:41:19Z",
    "updated_at": "2012-05-10T09:41:19Z",
    "last_request_at": "2012-05-10T09:41:19Z",
    "external_user_id": 123456,
    "facebook_id": "123456",
    "twitter_id": "123456",
    "blob_id": null,
    "custom_data": null,
    "user_tags": "university, department"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-04-23T09:09:26Z</created-at>
  <email>sun@domain.com</email>
  <external-user-id type='integer'>28552</external-user-id>
  <facebook-id>4561356</facebook-id>
  <full-name>Sun Burn</full-name>
  <id type='integer'>1326</id>
  <last-request-at type='datetime'>2012-04-23T09:38:34Z</last-request-at>
  <login>Sun</login>
  <owner-id type='integer'>4360</owner-id>
  <phone>7665727</phone>
  <twitter-id>1653489</twitter-id>
  <updated-at type='datetime'>2012-04-23T09:38:34Z</updated-at>
  <website>http://sun.com</website>
  <custom-data nil='true'/>
  <user-tags>temperature, humidity, pressure</user-tags>
</user>


Retrieve API Users by tags

Search API Users by tags

Parameters

Param Required Type Value Example Description
tags Yes String tag1,tag2,tag3 API User tag(s) The maximum number of tags per user: 5.
page No Unsigned Integer 3 Page number of the book of the results that you want to get. By default: 1
per_page No Unsigned Integer 15 The maximum number of results per page. Min: 1. Max: 100. By default: 10

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 3391435dc93a22fc3d864a16e8026f60417379ef" \
http://api.quickblox.com/users/by_tags.json?tags=type
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/by_tags.xml?tags=man,car

Response

{
  "current_page": 1,
  "per_page": 10,
  "total_entries": 2,
  "items": [
    {
      "user": {
        "id": 781,
        "owner_id": 4,
        "full_name": "Double Cloud",
        "email": "cloud@domain.com",
        "login": "Cloud",
        "phone": "78767356",
        "website": "http://cloud.com",
        "created_at": "2012-05-09T08:47:41Z",
        "updated_at": "2012-05-09T08:47:41Z",
        "last_request_at": "2012-05-09T08:47:41Z",
        "external_user_id": 283452,
        "facebook_id": "8526573",
        "twitter_id": "2376876",
        "blob_id": null,
        "custom_data": null,
        "user_tags": "type, volume"
      }
    },
  ...
  ]
}
<users type='array' current_page='1' per_page='5' total_entries='1'>
  <user>
    <blob-id type='integer' nil='true'/>
    <created-at type='datetime'>2012-03-01T11:03:06Z</created-at>
    <email nil='true'/>
    <external-user-id type='integer' nil='true'/>
    <facebook-id nil='true'/>
    <full-name nil='true'/>
    <id type='integer'>4</id>
    <last-request-at type='datetime'>2012-03-01T17:40:08Z</last-request-at>
    <login>mobile2</login>
    <owner-id type='integer'>3</owner-id>
    <phone nil='true'/>
    <twitter-id nil='true'/>
    <updated-at type='datetime'>2012-03-01T17:40:08Z</updated-at>
    <website nil='true'/>
    <custom-data nil='true'/>
    <user-tags>man,car</user-tags>
  </user>
</users>


Retrieve API User by external user id

Retrieve API User by external user id

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 3391435dc93a22fc3d864a16e8026f60417379ef" \
http://api.quickblox.com/users/external/158.json
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/external/158.xml

Response

{
  "user": {
    "id": 87,
    "owner_id": 4,
    "full_name": "John Partizan",
    "email": "john@domain.com",
    "login": "Kitty",
    "phone": "7665891",
    "website": "http://partizan.com",
    "created_at": "2012-03-20T08:47:34Z",
    "updated_at": "2012-05-10T09:21:19Z",
    "last_request_at": "2012-05-10T09:21:19Z",
    "external_user_id": 158,
    "facebook_id": "1346987743",
    "twitter_id": "545878645453",
    "blob_id": null,
    "custom_data": null,
    "user_tags": "hello, world, hey"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-03-20T08:47:34Z</created-at>
  <email>john@domain.com</email>
  <external-user-id type='integer'>158</external-user-id>
  <facebook-id>1346987743</facebook-id>
  <full-name>John Partizan</full-name>
  <id type='integer'>87</id>
  <last-request-at type='datetime'>2012-05-10T09:21:19Z</last-request-at>
  <login>Kitty</login>
  <owner-id type='integer'>4</owner-id>
  <phone>7665891</phone>
  <twitter-id>545878645453</twitter-id>
  <updated-at type='datetime'>2012-05-10T09:21:19Z</updated-at>
  <website>http://partizan.com</website>
  <custom-data nil='true'/>
  <user-tags>hello, world, hey</user-tags>
</user>


Update API User by identifier

Update API User by identifier

Parameters

Param Required Type Value Example Description
user[login] Optional String mylogin API User login
user[blob_id] Optional Integer 412 ID of associated blob (for example, API User photo)
user[email] Optional String superuser@domain.com API User e-mail
user[external_user_id] Optional Integer 21445 ID of API User in external system
user[facebook_id] Optional Integer 1000041 ID of API User in Facebook
user[twitter_id] Optional Integer 200655 ID of API User in Twitter
user[full_name] Optional String Captain Jack Full name
user[phone] Optional String 144-556488 Phone
user[website] Optional String http://quickblox.com Website
user[tag_list] Optional String tag1,tag2,tag3 Tags
user[custom_data] Optional String I'm at work now User's additional information
user[password] Optional String newsupersecure New password
user[old_password] Optional String oldpassword Old user password (required only if new password provided)

Request

curl -X PUT \
-H "Content-Type: application/json" \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{"user": {"full_name": "Tkach", "email": "ivanko@domain.com"}}' \
http://api.quickblox.com/users/1328.json
curl -X PUT \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
-d "user[full_name]=Sunny&user[email]=sunny@domain.com" \
http://api.quickblox.com/users/5.xml

Response

{
  "user": {
    "id": 798,
    "owner_id": 4,
    "full_name": "Tkach",
    "email": "ivanko@domain.com",
    "login": "Ivan",
    "phone": "123123",
    "website": "http://ivan.com",
    "created_at": "2012-05-10T09:41:19Z",
    "updated_at": "2012-05-10T15:21:07Z",
    "last_request_at": "2012-05-10T15:19:55Z",
    "external_user_id": 123456,
    "facebook_id": "123456",
    "twitter_id": "123456",
    "blob_id": null,
    "custom_data": null,
    "user_tags": "university, department"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <blob-id type='integer' nil='true'/>
  <created-at type='datetime'>2012-01-16T11:49:08Z</created-at>
  <email>sunny@domain.com</email>
  <external-user-id type='integer' nil='true'/>
  <facebook-id nil='true'/>
  <full-name>Sunny</full-name>
  <id type='integer'>5</id>
  <last-request-at type='datetime'>2012-05-10T10:12:11Z</last-request-at>
  <login>Olesja</login>
  <owner-id type='integer'>4</owner-id>
  <phone nil='true'/>
  <twitter-id nil='true'/>
  <updated-at type='datetime'>2012-05-10T10:25:56Z</updated-at>
  <website nil='true'/>
  <custom-data nil='true'/>
  <user-tags>name, age</user-tags>
</user>


Delete API User by identifier

Delete API User by identifier

Request

curl -X DELETE \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/36.json
curl -X DELETE \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/35.xml

Response

Status: 200, null
Empty body, status: 200


Delete API User by external user id

Delete API User by external user id

Request

curl -X DELETE \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/external/697.json
curl -X DELETE \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/external/696.xml

Response

Status: 200, null
Empty body, status: 200


Reset API User password by e-mail

Parameters

Param Required Type Value Example Description
email Required String usermail@quickblox.com API User e-mail

Request

curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/password/reset.json?email=usermail@quickblox.com
curl -X GET -d \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: b284ddf44f5369611fe14e0e588f1cfa855116c8" \
http://api.quickblox.com/users/password/reset.xml?email=usermail@quickblox.com

Response

Status: 200, null
Empty body, status: 200