• Resolved devdev2022

    (@devdev2022)


    Hi I can’t get the woocommerce API. In Postman, everything works well and I get data, but using js, I can’t get API.
    I used next library for get API:
    https://github.com/jamesugbanu/react-native-woocommerce-api

    code:

    Object {
      "code": "woocommerce_rest_authentication_error",
      "data": Object {
        "status": 401,
      },
      "message": "Недействительная подпись - предоставленная подпись не совпала.",
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @devdev2022,

    When the status shows a 401 error it indicates that it’s an authorization issue.

    Probably the credentials you’ve supplied while trying to access the endpoint are wrong or invalid. These are the most common reasons:

    – You have set the wrong API keys
    – Wrong permissions on the keys
    – The keys attached to the user have been deleted
    – The permalink settings for the site are incorrect (reset permalinks by going to Settings > Permalinks and clicking on the “Save Changes” button)

    I’d recommend taking a look at the WooCommerce REST API support documentation and following the instructions for correct authentication:

    https://woocommerce.com/document/woocommerce-rest-api/

    The documentation here goes over how to properly work with the API, and how to test it, and also provides some tips for sorting out 401 errors – https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API#401-unauthorized.

    Thanks.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    It’s been a while since we last heard back from you. I’m going to mark this thread as resolved.

    Hopefully, the above info was helpful. If you have further questions, please feel free to open a new topic.

    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get WooCoomerce API’ is closed to new replies.