Focuses on API authentication, access scopes, and permission management.
I have a public app and it generated an access token for a store "A".
I called order count API with the token as follows:
curl -X GET "https://storeA.myshopify.com/admin/api/2023-07/orders/count.json?status=any" -H "X-Shopify-Access-Token: ****"
Then I got the following error.
[API] Invalid API key or access token (unrecognized login or wrong password)
Actually I have another store "B" and its token works well with the same API and the same scope.
What is the problem of the token for store A? How can I remove this error and get the order count of the store?
Hi there 👋
That error means that the access token for store A is not correct.
Some things you may want to verify to help you debug
To learn more visit the Shopify Help Center or the Community Blog.
Hi Lizk,
We encountered a similar issue. In our case, after successful authorization, the AccessToken can be used normally. However, after a period of time, attempting to use it again results in the error message "Invalid API key or access token (unrecognized login or wrong password)," even though the store has not been logged into nor used the Shopify API during this period. After re-authorizing, we found that the AccessToken is the same as before, but it becomes usable again. We are using an offline mode AccessToken.