【问题标题】:401 Error on rest apis on default woocommerce API requests默认 woocommerce API 请求上的 401 REST API 错误
【发布时间】:2022-01-14 01:41:19
【问题描述】:

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

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

但是所有的东西都还没有工作,其余的一切都工作正常,但 woocommerce 的 rest-API 身份验证却没有

【问题讨论】:

    标签: wordpress woocommerce


    【解决方案1】:

    我得到了下面的解决方案,发布在这里: 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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-16
      • 2018-08-28
      • 2019-05-31
      • 2017-11-22
      • 2013-05-09
      • 2017-05-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多