StatusCode 401: Unauthorized.

Hi community,

We're trying to process the orders via the Ecom API that we have used in one of our C# projects. This method will check the last processed order every 5 minutes and retrieve the new order details via the following call:

https://{{api_key}}:{{[email protected]{{cluster}}.com/nl/orders/{{orderid}}json.

Where we previously were able to retrieve the order details, we're facing major issues since 1 week. While fetching the details we're receiving StatusCode 401: Unauthorized as a response. When I try to call this API via Postman it is perfectly working. Via browser too. We even have retrieved a new api_key and secret but it doesn't make any difference.

The strange thing is that this process had been running for 1 month without any problems, so I'm pretty confident that it is correct.

Could anyone tell me why we're not able to retrieve the order details via the api call as we're not able to process any orders right now.




  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 581 moderator

    Hi @solar4all,

    Thank you for contacting us.

    In order to get new order details you'd better can make use of webhooks. Check for all details about webhooks here and here.

    This error (401) means that something is wrong with the keys, can you check you've the headers correct? Can you share me your key, so I can check what is going on here?

  • solar4allsolar4all Member Posts: 2

    Hi @LucienVersendaal , the key that we're using is: 92be7935d818d22152b7d9ac85138210.

    Currently we're still facing above issue.

Sign In or Register to comment.