Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Api Access Now Returning 401 Unathorized Rate Topic   - - - - -

 

Posted 17 December 2015 - 12:34 PM #1

I'm accessing CS-Cart via the API and it was all working fine. Now, for some reason I don't understand, every API request is failing.  I've tried creating a new API key for the user and I've tried creating a new user with a new API key but it still fails.  Even the basic curl command in the documentation no longer works.

 

Where do I start to look?

 

 



 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3808 posts

Posted 17 December 2015 - 12:53 PM #2

I'm accessing CS-Cart via the API and it was all working fine. Now, for some reason I don't understand, every API request is failing.  I've tried creating a new API key for the user and I've tried creating a new user with a new API key but it still fails.  Even the basic curl command in the documentation no longer works.

 

Where do I start to look?

 

The issue requires examination on your server. Please contact us via HelpDesk.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19703 posts

Posted 17 December 2015 - 03:40 PM #3

Please PM me temporary FTP access so that we can check the issue


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

Posted 04 January 2016 - 01:44 PM #4

It turned out to be a server side issue after my provider had moved to me to another package.  The authentication headers were being stripped by their new defaults.

 

The CS-Cart help desk found the issue and my hosting service fixed it.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19703 posts

Posted 05 January 2016 - 09:58 AM #5

It turned out to be a server side issue after my provider had moved to me to another package.  The authentication headers were being stripped by their new defaults.

 

The CS-Cart help desk found the issue and my hosting service fixed it.

 

Thank you for letting us know it


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

Posted 31 August 2016 - 06:36 AM #6

Hi All,

 

I am also facing the same issue on local server. while i have started using API, it was working fine but suddenly it stopped working. It is displaying

{

  "message": "Unauthorized",
  "status": 401
}
message while accessing from postman client or from the basic curl command in the documentation no longer works. Only GET request working while accessing from browser.
 
My Postman request is as below
Method
----------
POST
 
Header
---------
Content-Type: application/json
 
Request Body
-------------------
{
"email":"customer@example.com"
}
 

Please suggest the sollution ASAP.



 
  • Nrhn
  • Newbie
  • Trial users
  • Join Date: 01-Oct 19
  • 1 posts

Posted 02 October 2019 - 12:51 PM #7

Hi, 

 

i get also the same errorcode: 

{"message":"Unauthorized","status":401}

when i try:

curl --header 'Authorization: Basic <base64-encoded email:APIkey pair>=' -X GET 'http://example.com/api/users/'
 

from the developerguide. https://docs.cs-cart...index.html#auth