• Resolved gabrielmq

    (@gabrielmq)


    Hello, I’ve been searching for a solution to my problem and, sadly, the ones I could find have not solved my issue.

    I’m trying to connect to the RESP API’s products and orders endpoints, yet, despite sending admin level credentials, I keep encountering a 401 response woocommerce_rest_cannot_view / woocommerce_rest_cannot_edit.
    I can connect and recieve correctly ends points such at wp-json/ and and wp-json/wc/v3/ but any endpoint beyond that responds with 401.
    I’m connecting through HTTP since it’s a test environment and sending the keys with OAuth 1.0 as the documentation explains, both in Postman and the backend I’m working on and need to connect with the API.

    I’ve been discarding problems with the server configuration itself on Bitnami’s forum before opening this topic.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support slash1andy

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    sending admin level credentials

    Can you elaborate how you are getting these credentials? They are different than your login credentials, so making sure you have the right creds is the first step.

    Thread Starter gabrielmq

    (@gabrielmq)

    The consumer key and consumer secret created through the WP admin page, as instructed in the documentation. I’ve made sure my own user has permissions as well and confirmed with a coworker that it’s not just my account that has this issue.
    I am sending the requests using OAuth 1.0 authentication as noted since the environment is using HTTP and not HTTPS. I’ve also deactivated all other plugins and tested to make sure it wasn’t an issue with plugins.

    Thread Starter gabrielmq

    (@gabrielmq)

    For some extra info: The instance is deployed on AWS using Bitnami, I’ve followed the suggestions on their part. Most problems with 401 I’ve been able to find are related to HTTPS and how authentication is handled with it, but our server uses HTTP, since it’s for testing, and in the few cases related to HTTP the proposed solutions sadly didn’t work.

    Thread Starter gabrielmq

    (@gabrielmq)

    @slash1andy Can you help me out with this problem, please?
    I’ve checked my accounts permissions before making the keys for the API. I’ve also made new keys and followed the other instructions for a 401 response.

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @gabrielmq

    First part – have you disabled the SSL certificate verification in Postman? https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API#common-connection-issues

    And to confirm – you are using this documentation for Auth over HTTP listed here – https://woocommerce.github.io/woocommerce-rest-api-docs/#authentication-over-http

    If you got this resolved over the past few weeks, please do let us know here the solution.

    Thanks,

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @gabrielmq. We haven’t heard from you in a while so I’m going to go ahead and mark this thread as resolved. If you still need help with this issue or have any other questions about the WooCommerce plugin, please start a new thread.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘REST API 401 response’ is closed to new replies.