API, upon request, constantly issues status code 401

Skreiphoff
New Member
5 0 0

Hi, I got a problem, when I try to get a list of products from the code, my API gives the status code 401, although it works fine from the browser. I can't figure out what the problem is.

0 Likes
Skreiphoff
New Member
5 0 0

My query in code 

https://API_key:API_key_secret@upsell-skreip-dev.myshopify.com/admin/api/2020-10/inventory_levels.json?inventory_item_ids=456418643246 
0 Likes
_JB
Shopify Staff
Shopify Staff
834 98 188

Hey @Skreiphoff,

If it's working in the browser, it's likely an issue with how your client is sending the call. Status code 401 is usually due to invalid credentials, so make sure your client is properly sending the credentials in the URL.

If you're still having trouble with it, please provide the X-Request-ID value from the response headers of a failed call, and we can use that to find more information in the logs.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes