API Returns 404

Topic summary

A developer is encountering persistent 404 errors when attempting to make API requests to their Shopify store, despite following standard setup procedures. They’ve created a custom app, configured Admin API access scopes, and obtained necessary credentials (token, API key, secret key).

Testing methods attempted:

  • cURL requests to the GraphQL endpoint
  • Python requests library
  • Both return {"errors":"Not Found"} responses

The issue affects the GraphQL endpoint (/admin/api/2024-07/graphql.json) specifically. One respondent suggests:

  • Verifying variables are outputting correct URLs
  • Testing the endpoint directly in a browser
  • Using verbose cURL output
  • Testing with API clients like Insomnia or Postman
  • Using network inspection tools

Key observation: Another user reports experiencing identical 404 errors with GraphQL endpoints on one specific store, while REST API calls continue working normally and other stores function properly. This suggests the issue may be store-specific rather than a general configuration problem.

Status: Unresolved; troubleshooting ongoing to identify whether this is a credentials issue, endpoint problem, or store-specific limitation.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hello everyone!

It’s the first time I’m testing the API requests for Shopify, trying to test product creation and inventory management (still at the part where I try to get any response from my webstore). I created a new Shopify app like advised, set up the Admin API access scopes to and got access to my token, key and secret key.

I first tried testing via cURL requests and always got 404s

curl -X POST \
https://SHOPNAME.myshopify.com/admin/api/2024-07/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {TOKEN}' \
-d '{
"query": "query { products(first: 2, reverse: true) { edges { node { id title handle resourcePublicationOnCurrentPublication { publication { name id } publishDate isPublished } } } } }"
}'

results in:

{"errors":"Not Found"}%

And also using python:

import requests
import json

shop_credentials = 'shop_credentials.json'

with open(shop_credentials) as f:
       shop_credentials = json.load(f)

domain = 'https://SHOPNAME.myshopify.com'
endpoint = '/admin/api/2024-07/graphql.json?'
product_fields = 'limit=2'

base_url = domain + endpoint + product_fields

header_values = {'Content-Type':'application/json','X-Shopify-Access-Token':shop_credentials['api_token']}

get_products = requests.get(base_url, headers = header_values)

print(get_products)
print(get_products.url)
print(get_products.text)

results in:

<Response [404]>
https://SHOPNAME.myshopify.com/admin/api/2024-07/graphql.json?limit=2
{"errors":"Not Found"}

There must be something I am missing out on. What do you think is the most likely cause?

And is the following documentation still relevant?
https://shopify.dev/docs/api/admin-rest/2024-01/resources/product#resource-object
https://shopify.dev/docs/api/admin-graphql/2024-01/queries/products

Thank you so much!!

Docs are still revelant, the apis are versioned using a date convention, which you can change to older version at the top of the docs sidebar.

Everything seems sane, assuming variables like STORE are actually outputting correct info for the final base_url

Check what happens when you try to directly navigate to that endpoint in a browser you should get a browser login modal; at least on devshops.

Or you may need to make curl be verbose

Or use a api client such as insomnia or postman as another sanity check.

Or use a network inspector like charlesproxy.

We integrated Shopify and encountered the same issue, but it only happens with this one specific Shopify store, while all other stores are unaffected. I think you can try integrating with another store to see if it works properly.

And it seems that all resources with GraphQL are returning 404, while REST API calls still work.