Hi folks,
I’m attempting a test API call to the customer account API with OAuth2 using Insomnia. I can acquire the access token, but when I attempt to use it I get “Not a valid access token”.
The token is not expired, I use it shortly after it’s acquired and it has almost 2 hours before expiration. I’m making a POST request. I’m not sure which URL I should be hitting, though I’ve tried both the shop url
https://my-shop-name.myshopify.com/api/2024-01/graphql.json
which I use to successfully access the storefront API, and I’ve tried the url suggested in the docs under endpoints and queries which is
https://shopify.com/<shop_id>/account/customer/api/unstable/graphql.
The headers are Content-Type : application/json; Authorization : Bearer token
I’m using this json formatted graphql query
{“query”: “query { customer { email } }”}
though I’ve also attempted using a structured graphql query.
The result of the request is
{
“errors”: [{
“message”: “”,
“extensions”: {
“code”: “ACCESS_DENIED”}}]
}
Any advice is appreciated
Kind regards