• Resolved hamzamarketing

    (@hamzamarketing)


    Hello guys,

    I try to connect 2 different apps to WooCommerce via REST API but they both don’t want to connect.

    I notice the API key is created in Woocommerce but NO webhooks. Also, I see that last access for that API key is “Unknown”. (see screenshots)

    I tried connecting those apps to a different website under the same host and they both were connected successfully. (see screenshots)

    I tried deactivating all plugins and switched to default theme. Same problem.

    The issue is not related to those apps and is not related to the host. It’s related to the website. I’m sure.

    Please help me guys. It’s turning me crazy.

    //// Screenshots /////
    Website 1 API keys (the one with problem) https://imgur.com/n0hild1
    Website 2 API keys https://imgur.com/lH1RY4V

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support EastOfWest a11n

    (@eastofwest)

    Hi there,

    Have you worked through the WooCommerce Rest API docs, as well as how to test if it works?

    * https://docs.woocommerce.com/document/woocommerce-rest-api/
    * https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API

    If you did, what happens when they both don’t want to connect? Do you get a 404 error, a 403 error, does it time out, or something else?

    Here’s a few other basics that are often overlooked:

    * Have you enabled permalinks?
    * Do the keys have appropriate read/write permissions?
    * Does the assigned user have an appropriate role (example: a “Customer” can’t view orders, even with API keys)

    Let us know how it goes!

    Thread Starter hamzamarketing

    (@hamzamarketing)

    Hello EastOfWest, thanks for your assistance!

    I tried testing the api key with Postman (/wp-json/wc/v2/products) and I got the following response.

    {
    “code”: “woocommerce_rest_cannot_view”,
    “message”: “Sorry, you cannot list resources.”,
    “data”: {
    “status”: 401
    }
    }

    * Have you enabled permalinks? Yes.
    * Do the keys have appropriate read/write permissions? Yes.
    * Does the assigned user have an appropriate role? Yes, administrator.

    I tested the same API request for the other website that is under the same host and I got a good response (Products related data…etc.).

    Thread Starter hamzamarketing

    (@hamzamarketing)

    I got it fixed. I saw in a similar thread that installing a plugin called “Application Passwords” solves the issue. I did the same and now it’s fixed!!!

    Thank you for your assistance, I’ll mark thread as solved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘weird API problem’ is closed to new replies.