默认 woocommerce API 请求的 rest api 出现 401 错误

401 Error on rest apis on default woocommerce API requests

他们在基本休息 APIs 中出现了一个奇怪的 401 错误。 例如:

https://parosi.techchef.org/wp-json/wc/v3/products/categories?consumer_key=ck_f76c28eae983eb9b237d6bb81dd5b6c1ee35d16f

我已经按照步骤检查并排除故障。

1- Enable the legacy REST API is checked
2- I have made new rest api and applied the same consumer key
3- I created new admin and tried
4- I replace htaccess with default wordpress
5- I have upgrade both wordpress and woocommerce version to latest
6- I have disabled all other plugins

但是 none 的东西仍然工作,休息一切都工作正常但休息-API woocommerce 的身份验证没有

我得到了下面的解决方案,贴在这里: WooCommerce - woocommerce_rest_cannot_view - Status 401

The 401 error you are getting is because you are using basic auth even though your website is not secure (does not have https).

The solution in postman is to use OAuth 1.0. Just add the consumer key and consumer secret and send the request.