0

Magento2 CE REST API for customer information update not validating the given password with actual password, it accepts everything.

Content-Type : application/json
Authorization: Bearer "customerToken"

Method: PUT <base_url>/rest/V1/customers/:customerID

Request:
{
  "customer": {
    "id": "45338",
    "email": "test230720195@yopmail.com",
    "firstname": "Updatetest",
    "lastname": "Testing",
    "websiteId": 1
  },
  "password": "qawsedrf!"
}

Is any other API exist to update customer information with password validation?

1
  • I don't know about enterprise edition but in community you need to create one yourself. – Zefiryn Aug 3 '18 at 9:49
0

To reset customer password you can use the following request

Content-Type : application/json
Authorization: Bearer "authToken"

Method: PUT <base_url>/rest/V1/customers/me/password

Request:
{
  "currentPassword": "string",
  "newPassword": "string"
}

Note auth token here is a value you are getting with

/V1/integration/customer/token

And for the request in your question, you should use token from

/V1/integration/admin/token

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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