We are trying to access the product data as well as product count. However, we are getting Invalid API Key error with the GraphQl request. We are using the token that gets created upon a new shop installation and it had been working fine for a long time but we recently encountered the issue when we upgraded the REST APIs with GraphQl APIs. Upon further investigation, we realised even some of the rest endpoint throw the same error. Please provide assistance.
Here are some of the endpoints:
curl -X POST https://abcd.myshopify.com/admin/api/2021-07/graphql.json \
> -H 'Content-Type: application/json' \
> -H 'X-Shopify-Access-Token: {token}' \
> -d '{"query": "{ products(first: 3) { edges { node { id title } } } }"}'
curl -X GET "https://abcd.myshopify.com/admin/api/2024-04/shop.json" \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {token}'