admin管理员组

文章数量:1323714

I am using JWT to make call threw the woocommerce api.

I created a kind of bot which is an admin user which I connect through JWT api to get a token.

With the token at the moment I am doing calls to create customers, orders. Getting products and everything is working fine. I am trying to implement a new call to update a customer and I have woocommerce_rest_cannot_edit . The user I am making the call with is admin and have an aop rest key related to him granting access on read and write. Not sure this api key is useful.

If I am trying to make a call with this api key I have an error from JWT jwt_auth_bad_auth_header

I am using JWT to make call threw the woocommerce api.

I created a kind of bot which is an admin user which I connect through JWT api to get a token.

With the token at the moment I am doing calls to create customers, orders. Getting products and everything is working fine. I am trying to implement a new call to update a customer and I have woocommerce_rest_cannot_edit . The user I am making the call with is admin and have an aop rest key related to him granting access on read and write. Not sure this api key is useful.

If I am trying to make a call with this api key I have an error from JWT jwt_auth_bad_auth_header

Share Improve this question edited Sep 9, 2020 at 15:20 Tom J Nowell 61k7 gold badges79 silver badges148 bronze badges asked Sep 9, 2020 at 13:48 AjouveAjouve 1112 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The user you are using to update an user has to be network admin

This was my issue

本文标签: apiUpdate Customer JWT Woocommerce