Title: API Authentication
Last modified: January 15, 2019

---

# API Authentication

 *  Resolved [bluesangeleric](https://wordpress.org/support/users/bluesangeleric/)
 * (@bluesangeleric)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/api-authentication-2/)
 * 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](https://wordpress.org/support/users/fullysupportedphil/)
 * (@fullysupportedphil)
 * Automattic Happiness Engineer
 * [7 years, 3 months ago](https://wordpress.org/support/topic/api-authentication-2/#post-11097749)
 * If you generate a new key for this account, do you have the same problem?
 *  Thread Starter [bluesangeleric](https://wordpress.org/support/users/bluesangeleric/)
 * (@bluesangeleric)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/api-authentication-2/#post-11097764)
 * 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](https://github.com/georgestephanis/application-passwords/wiki/Basic-Authorization-Header----Missing))
   to resolve that issue, which in turn allowed the code to finish executing.
    -  This reply was modified 7 years, 3 months ago by [bluesangeleric](https://wordpress.org/support/users/bluesangeleric/).

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

The topic ‘API Authentication’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [authentication](https://wordpress.org/support/topic-tag/authentication/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [node](https://wordpress.org/support/topic-tag/node/)
 * [rest](https://wordpress.org/support/topic-tag/rest/)

 * 2 replies
 * 2 participants
 * Last reply from: [bluesangeleric](https://wordpress.org/support/users/bluesangeleric/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/api-authentication-2/#post-11097764)
 * Status: resolved