Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Error creating product using the API with Python

Error creating product using the API with Python

NeatB
Visitor
1 0 0

I try to connect to our store and create product using the API but I'm getting the below error even though I've all the necessary credentials

 'Failed to create Shopify product. Status code: 401 {"errors":"[API] Invalid API key or access token (unrecognized login or wrong password)"}' 

I have the Admin API access token, API key, and API secret key

here is how I construct my url

 

 

SHOPIFY_URL = f'https://{API_KEY}:{ADMIN_API_ACCESS_TOKEN}@{SHOP_URL}/admin/api/{API_VERSION}/'

 

 

I've created two apps which gave the same result.
When I use the script on my personal Shopify store which is a partner account everything works fine. But on the company's account it doesn't. What could be the problem and solution to it.

Reply 1 (1)

adriamesas
Visitor
1 0 0

Hey @NeatB have you solved the issue? 

 

I am having the same problem and i do not know how to solve it...