• Resolved bluesangeleric

    (@bluesangeleric)


    I have been working with the WooCommerce REST API to develop a cross-platform product management solution for my store. I am working in JavaScript (MERN stack) and have been using Axios for my XHR client.

    After some initial struggles due to not installing the JSON Basic Authentication plugin, I was able to get everything running smoothly. However, this morning, I was suddenly unable to authenticate via the API. After spending the whole day playing with it (including attempting — unsuccessfully, probably for related reasons — to integrate the official WooCommerce-API Node package and finally getting our site’s SSL certificate installed), I have managed to get read access back, but no luck on writing. The API key I generated on the admin panel is tied to a dedicated WooCommerce user with Admin access.

    Does anyone have any insight on what could possibly have caused my authentication to fail out of nowhere?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Phil

    (@fullysupportedphil)

    Automattic Happiness Engineer

    If you generate a new key for this account, do you have the same problem?

    Thread Starter bluesangeleric

    (@bluesangeleric)

    I actually just got this issue worked out. Turns out I didn’t do my due diligence in tracing the problem, and the actual root cause was an error earlier on in the script when I was uploading image via the WordPress API. In case anyone else has this issue later on, the problem was that the authentication information wasn’t being passed along correctly. I needed to install the Application Passwords plugin and make an edit to my .htaccess (detailed here) to resolve that issue, which in turn allowed the code to finish executing.

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