REST API
- Overview
- Limits
- Errors
- GETGet Account Settings
- Authentication
- Users
- Ovevriew
- User Model
- POSTCreate User
- POSTCreate Token with API key
- DELDelete Token with API key
- DELFlush Tokens with API key
- GETList Users
- GETList Users by Full Name
- GETList Users by Tags
- GETGet User by ID
- GETGet User by Login
- GETGet User by Facebook ID
- GETGet User by Email
- GETGet User by External User ID
- PUTUpdate User
- DELDelete User by ID
- DELDelete User by External ID
- GETReset User Password
- Chat
- Content
- Push Notifications
- Custom Objects
- Address Book
- AI
Update User
Update a user by ID. A user can be updated only by themselves or an account owner. You can use this request to update a user password. In this case, you need to pass the old password and new password to the update user request.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
{
"user": {
"id": 96831397,
"full_name": "Jen Lesser",
"email": "jen_lesser@gmail.com",
"login": "Jen_Lesser",
"phone": "+965234215",
"website": "https://jen.com",
"created_at": "2019-08-29T19:15:17Z",
"updated_at": "2019-09-01T14:03:58Z",
"last_request_at": "2019-09-01T14:02:54Z",
"external_user_id": 1433712,
"facebook_id": "125553",
"twitter_id": "998800",
"blob_id": null,
"custom_data": "Head of marketing",
"age_over16": true,
"allow_statistics_analysis": false,
"allow_sales_activities": false,
"parents_contacts": "",
"user_tags": "android,web"
}
}
Recipes
1. Use a `user` parameter to set a new password
curl -X PUT\
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"old_password":"myoldpassword!" \
"password":"mynewpassword!"
}
}' \
https://api.quickblox.com/users/96831397.json
2. Set an old password
Use an old_password
parameter to set an old password.
curl -X PUT\
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"old_password":"myoldpassword!" \
"password":"mynewpassword!"
}
}' \
https://api.quickblox.com/users/96831397.json
3. Set a new password
Use a password
parameter to set a new password.
curl -X PUT\
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"old_password":"myoldpassword!" \
"password":"mynewpassword!"
}
}' \
https://api.quickblox.com/users/96831397.json
4. As a result, the API returns a user with an updated password.
curl -X PUT\
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"old_password":"myoldpassword!" \
"password":"mynewpassword!"
}
}' \
https://api.quickblox.com/users/96831397.json
1. Use a `user` parameter to update a user
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
2. Set new values for the fields
You can update any field of the user.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
3. As a result, the API returns a user with the specified updated fields.
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
1. Use 'Authorization' header to pass API key
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
2. Use a `user` parameter to update a user
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
3. Set new values for the fields
You can update any field of the user.
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
4. As a result, the API returns a user with the specified updated fields.
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
1. Use 'Authorization' header to pass API key
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"password":"newpasswordforuser!"
}
}' \
https://api.quickblox.com/users/96831397.json
2. Use a `user` parameter to set a new password
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"password":"newpasswordforuser!"
}
}' \
https://api.quickblox.com/users/96831397.json
3. Set a new password
Use a password
parameter to set a new password for the specified user
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"password":"newpasswordforuser!"
}
}' \
https://api.quickblox.com/users/96831397.json
4. As a result, the API returns a user with an updated password.
curl -X PUT\
-H "Content-Type: application/json" \
-H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
-d '{
"user":{
"password":"newpasswordforuser!"
}
}' \
https://api.quickblox.com/users/96831397.json
Path Parameters
Body Parameters
login
or email
. login
or email
. Headers
ApiKey {your_api_key}
. Must be used either QB-Token or Authorization.Responses
A successful response
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
{
"user": {
"id": 96831397,
"full_name": "Jen Lesser",
"email": "jen_lesser@gmail.com",
"login": "Jen_Lesser",
"phone": "+965234215",
"website": "https://jen.com",
"created_at": "2019-08-29T19:15:17Z",
"updated_at": "2019-09-01T14:03:58Z",
"last_request_at": "2019-09-01T14:02:54Z",
"external_user_id": 1433712,
"facebook_id": "125553",
"twitter_id": "998800",
"blob_id": null,
"custom_data": "Head of marketing",
"age_over16": true,
"allow_statistics_analysis": false,
"allow_sales_activities": false,
"parents_contacts": "",
"user_tags": "android,web"
}
}
Was this page helpful?
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 7483d80bb9caddd504764d85b050c85755aecc84" \
-d '{
"user":{
"login":"Jen_Lesser",
"email":"jen_lesser@gmail.com",
"external_user_id":"1433712",
"facebook_id":"125553",
"full_name":"Jen Lesser",
"phone":"+965234215",
"website":"https://jen.com",
"tag_list":"android,web",
"custom_data":"Head of marketing"
}
}' \
https://api.quickblox.com/users/96831397.json
{
"user": {
"id": 96831397,
"full_name": "Jen Lesser",
"email": "jen_lesser@gmail.com",
"login": "Jen_Lesser",
"phone": "+965234215",
"website": "https://jen.com",
"created_at": "2019-08-29T19:15:17Z",
"updated_at": "2019-09-01T14:03:58Z",
"last_request_at": "2019-09-01T14:02:54Z",
"external_user_id": 1433712,
"facebook_id": "125553",
"twitter_id": "998800",
"blob_id": null,
"custom_data": "Head of marketing",
"age_over16": true,
"allow_statistics_analysis": false,
"allow_sales_activities": false,
"parents_contacts": "",
"user_tags": "android,web"
}
}