Shopify-api-node
Shopify-api-node copied to clipboard
Shopify API GET requests returning "Response code 401 (Unauthorized)"
Hey guys! What's up?!
I built an application using serverless by creating Lambda on AWS. These lambdas work as endpoints and you can call them via GET or POST.
Nowadays, I have many custom GET functions that are using the API to fetch and update order information (get and post) and it is working fine.
The problem is when I try to access this API through a lambda post function, I get an error message (Response code 401 (Unauthorized))
[ERROR] HTTPError: Response code 401 (Unauthorized)
This is very strange because when I get this error, the API calls that were working through my GETs methods stop working and have the same problem for 1 or 2 minutes.
A workaround, was to call the direct URL through AXIOS and my access token, and it worked perfectly, but the issue is that I want to maintain a default using this library.
Does anyone have any idea what I could be doing wrong?