• I am having this problem “{“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}..I found a a bunch of code for solution.
    But I don’t know where to use them inside WordPress ?

    Codes:
    require “woocommerce_api”

    woocommerce = WooCommerce::API.new(
    https://example.com”,
    “consumer_key”,
    “consumer_secret”,
    {
    wp_json: true,
    version: “wc/v1”,
    query_string_auth: true
    }
    )

    Please help me

    Thanks

    • This topic was modified 7 years, 5 months ago by mridulcse.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I suggest you start over again with getting consumer key and secret. Follow the instructions here very carefully.

    Your code looks like it’s for the Ruby Client. Is Ruby something you are comfortable with using? While there’s nothing wrong with it if that’s what you are comfortable with, it’s somewhat of an unusual choice. Of course your choices depend on what you are developing for, of which I’ve no idea.

Viewing 1 replies (of 1 total)

The topic ‘WordPress Api authentication error’ is closed to new replies.