I am stuck at a point with my custom app where I am unable to access Shopify order history of a given customer. the script returns an error: Invalid API key or access token (unrecognized login or wrong password). I have insured that the keys (hidden key and client ID) are correct. how do I give my app access to the customer’s order history? (I have access to the read all orders scope)
It’s likely you just aren’t sending the correct header with the script!
Is there a “X-Shopify-Access-Token” header in your request?
yes, there is an X-Shopify-Access-Token header.
#…
response = requests.get(
shopify_url,
headers={
“X-Shopify-Access-Token”: SHOPIFY_SECRET_KEY,
“Content-Type”: “application/json”
}
#…
Is there something I am doing wrong here?
ok, never mind, I was careless while reading the documentation. I forgot to add the x shopify access token, and now that I added it, it works.