Search code examples
c#iosxamarin.formswoocommercewoocommerce-rest-api

Woocommerce Update Customer Password


I'm building a basic login / register page for my iOS app.

This app currently connects to my website via the Woocommerce API.

https://example.com/wp-json/wc/v3/customers?consumer_key=xxxx&consumer_secret=xxxx

I can see all the customer's details and previous orders via the API but I can't seem to find where the customer's password is in the JSON package (or Woocommerce API documentation) so that the app can make changes to the customer's password.

Here's a sample of the JSON response:

{
        "id": 29327,
        "date_created": "2020-07-22T09:53:59",
        "date_created_gmt": "2020-07-21T23:53:59",
        "date_modified": "2020-07-27T08:51:33",
        "date_modified_gmt": "2020-07-26T22:51:33",
        "email": "xxxx",
        "first_name": "xxx",
        "last_name": "xxxx",
        "role": "customer",
        "username": "xxxx",
        "billing": {
            "first_name": "xx",
            "last_name": "xxx",
            "company": "",
            "address_1": "xxx"

Any help would be greatly appreciated.


Solution

  • From the WooCommerce document , we will see that the Customer properties contain the follow Attributes :

    enter image description here

    However , the password attribute is write-only type, therefore it will not show in the json response.