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"
}
}
{
"code": null,
"message": "No data was provided"
}
{
"errors": {
"base": [
"You are not owner of this object"
]
}
}
// Validation errors
{
"errors": {
"email": [
"has already been taken."
],
"login": [
"has already been taken"
],
"facebook_id": [
"has already been taken"
],
"twitter_id": [
"has already been taken"
],
"tag": [
"length should between 3..15 symbols",
"should contain alphanumeric characters and start with a letter"
],
"phone": [
"is not a number"
]
}
}
// Incorrect old password
{
"errors": {
"base": [
"Incorrect old password provided"
]
}
}
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"
}
}
{
"code": null,
"message": "No data was provided"
}
{
"errors": {
"base": [
"You are not owner of this object"
]
}
}
// Validation errors
{
"errors": {
"email": [
"has already been taken."
],
"login": [
"has already been taken"
],
"facebook_id": [
"has already been taken"
],
"twitter_id": [
"has already been taken"
],
"tag": [
"length should between 3..15 symbols",
"should contain alphanumeric characters and start with a letter"
],
"phone": [
"is not a number"
]
}
}
// Incorrect old password
{
"errors": {
"base": [
"Incorrect old password provided"
]
}
}
Recipes
Update user password
Update user password
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
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
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
Update user
Update user
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
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
Update user with API key
Update user with API key
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
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
Update user password with API key
Update user password with API key
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
password parameter to set a new password for the specified usercurl -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
Show User object properties
Show User object properties
login or email. login or email. Headers
ApiKey {your_api_key}. Must be used either QB-Token or Authorization.Responses
200
200
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"
}
}
{
"code": null,
"message": "No data was provided"
}
{
"errors": {
"base": [
"You are not owner of this object"
]
}
}
// Validation errors
{
"errors": {
"email": [
"has already been taken."
],
"login": [
"has already been taken"
],
"facebook_id": [
"has already been taken"
],
"twitter_id": [
"has already been taken"
],
"tag": [
"length should between 3..15 symbols",
"should contain alphanumeric characters and start with a letter"
],
"phone": [
"is not a number"
]
}
}
// Incorrect old password
{
"errors": {
"base": [
"Incorrect old password provided"
]
}
}
Was this page helpful?