WooCommerce REST API“woocommerce_rest_cannot_view" [英] WooCommerce REST API "woocommerce_rest_cannot_view "

查看:117
本文介绍了WooCommerce REST API“woocommerce_rest_cannot_view"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我粘贴此链接时

http://localhost/wordpress/wp-json/wc/v2/products?consumer_key=ck_*******************&consumer_secret=cs_********************

http://localhost/wordpress/wp-json/wc/v2/products?consumer_key=ck_*******************&consumer_secret=cs_********************

它向我显示此错误消息

{"code":"woocommerce_rest_cannot_view","message":"D\u00e9sol\u00e9, vous ne pouvez pas lister les ressources.","data":{"status":401}}

{"code":"woocommerce_rest_cannot_view","message":"D\u00e9sol\u00e9, vous ne pouvez pas lister les ressources.","data":{"status":401}}

顺便说一下,消费者键 &秘密是正确的

by the way the cosumers key & secret are correct

推荐答案

您的连接必须抛出 https并将此行添加到您的 woocommerce init 中:

Your connection must be throw https and add this lines to your woocommerce init :

{
....
      verifySsl: false,
      queryStringAuth: true
}

每个帖子请求都需要 ssl

every post request require ssl

从此链接复制Ionic 3 WP-REST API 发布请求401(未经授权)错误&WooCommerce REST APIwoocommerce_rest_cannot_view"

dublicate from this link Ionic 3 WP-REST API Post request 401 (unauthorized) error & WooCommerce REST API "woocommerce_rest_cannot_view "

这篇关于WooCommerce REST API“woocommerce_rest_cannot_view"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆