I am using services module to consume users account details.

Enabled user in admin->services->resources.

URL: https://drupal.com/service/user/23

method : post

request body:
{ "current_pass":"xyz" "email":"[email protected]" }

I have updated these two values are successfully, but how can I change new password and confirm password values.

How to take these values in request body and I have tried like this(new_pass) but failed to update.

Please help me.

1 Answer 1



where 9 is User ID

Method : PUT

Pass 'X-CSRF-Token' paramerter with user token value in header.

Example Call :


  • it shows ["Access denied for user anonymous"] error
    – RaMeSh
    Commented Sep 24, 2015 at 10:03
  • for change your password you need already been logged in. You need to get X-CSRF-Token and then you need to call this change password.
    – vgoradiya
    Commented Sep 24, 2015 at 10:07
  • i have already logged in,and taken X-CSRF token and entered in header page and entered current_pass and pass,pass1 and click on PUT ,same error got.{ACCESS DENIED}
    – RaMeSh
    Commented Sep 24, 2015 at 10:10
  • you need to post not put
    – vgoradiya
    Commented Sep 24, 2015 at 10:11
  • if click POST 404 error ,could not find controller
    – RaMeSh
    Commented Sep 24, 2015 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.