Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

API call using Python: 404 Not found

API call using Python: 404 Not found

Noitseuq
Visitor
2 0 0

Hi, 

 

I'm new to the Shopify API and am trying to collect the order information from my shop using python. 

 

API_KEY = 'XXXXXXXXXX'
API_SECRET_KEY = 'ZZZZZZZ'
API_PASSWORD = 'YYYYYYY'
HOSTNAME = 'MYDOMAIN.myshopify.com'
VERSION = '2022-07'
RESOURCE = 'orders'

url = f'https://{API_KEY}:{API_PASSWORD}@{HOSTNAME}/admin/api/{VERSION}/{RESOURCE}.json'
r = requests.get(url)
printr.json() )
 
This results in the output: 
{'errors': 'Not Found'}
 
I have tried other endpoints such as 'products.json' as in this tutorial: 
 
I still get 'Not found' even though I copy his tutorial. 
 
It is a private app, and I have given it all the permissions. 
 
I suspect the call actually works but doesn't connect to the shop for some reason.... 
Is there some way to test this?
Or do any of you have any ideas on how to solve this? 
 
Thanks in advance
Replies 0 (0)