Title: AUTHENTICATION_ERROR
Last modified: September 2, 2020

---

# AUTHENTICATION_ERROR

 *  Resolved [iamganesh](https://wordpress.org/support/users/iamganesh/)
 * (@iamganesh)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/authentication_error-2/)
 * Hello team,
 * While processing the sandboox payment it showing the following response.
 * “errors”: [{“code”: “UNAUTHORIZED”,”detail”: “This request could not be authorized.”,”
   category”: “AUTHENTICATION_ERROR”}]}
    ”
 * Exception has occurred.
 * SquareConnect\ApiException: [HTTP/2 401] {“errors”:[{“category”:”AUTHENTICATION_ERROR”,”
   code”:”UNAUTHORIZED”,”detail”:”The `Authorization` http header of your request
   was malformed. The header value is expected to be of the format \”Bearer TOKEN\”(
   without quotation marks), where TOKEN is to be replaced with your access token(
   e.g. \”Bearer ABC123def456GHI789jkl0\”).
 * All keys are entered correctly!
 * Looking forward to hearing from you.

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

 *  Plugin Support [slash1andy](https://wordpress.org/support/users/slash1andy/)
 * (@slash1andy)
 * Automattic Happiness Engineer
 * [5 years, 7 months ago](https://wordpress.org/support/topic/authentication_error-2/#post-13351219)
 * Hey there!
 * This error message come directly from Square, and it only means one thing: There’s
   an issue with the credentials/keys you are using.
 * Normally this means there’s an issue with the actual credentials, but there is
   a tiny chance that the server you are on is preventing it from connecting and
   authorizing properly. I would double and triple check your credentials, and then
   check with your host to see if they can see the requests being made, and what
   is happening to them.
 * Hopefully that helps! Have a great one!
 *  [Elvira K.](https://wordpress.org/support/users/treibalen/)
 * (@treibalen)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/authentication_error-2/#post-13351439)
 * Hi there [@iamganesh](https://wordpress.org/support/users/iamganesh/),
 * In addition to my colleague’s reply above, can you please check if you have any
   security plugins active?
 * We’ve seen cases when plugins such as `Sucuri Security - Auditing, Malware Scanner
   and Hardening: by Sucuri Inc.` and its Automatic Secret Keys Updater feature 
   are altering Square’s tokens stored in the database and that caused Square to
   disconnect frequently.
 * Cheers!
 *  Thread Starter [iamganesh](https://wordpress.org/support/users/iamganesh/)
 * (@iamganesh)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/authentication_error-2/#post-13353652)
 * Hello there,
 * My site is HTTP, not HTTPS. It may cause this issue?
 * Also, there is no SSL.
    -  This reply was modified 5 years, 7 months ago by [iamganesh](https://wordpress.org/support/users/iamganesh/).
 *  Plugin Support [Aashik P – a11n](https://wordpress.org/support/users/aashik/)
 * (@aashik)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/authentication_error-2/#post-13359178)
 * Hi there!
 * > My site is HTTP, not HTTPS. It may cause this issue?
 * While SSL is indeed required for Square live payments, I just tested this on 
   my local site to confirm that payments go through on the Sandbox environment 
   even on HTTP.
 * The error you’re seeing is specifically regarding Authentication. I’d disconnect
   from Square and follow the instructions in [Sandbox Mode – Documentation](https://docs.woocommerce.com/document/woocommerce-square/#section-6)
   to see if that helps.
 * If you’re still seeing the same error, could you please share a copy of your 
   site’s System Status? You can find it via WooCommerce > Status.
    Select “Get 
   system report” and then “Copy for support”.  Once you’ve done that, paste it 
   here in your response.
 *  [Elvira K.](https://wordpress.org/support/users/treibalen/)
 * (@treibalen)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/authentication_error-2/#post-13392314)
 * Hi there [@iamganesh](https://wordpress.org/support/users/iamganesh/),
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.

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

The topic ‘AUTHENTICATION_ERROR’ is closed to new replies.

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

 * 5 replies
 * 4 participants
 * Last reply from: [Elvira K.](https://wordpress.org/support/users/treibalen/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/authentication_error-2/#post-13392314)
 * Status: resolved