Re: always get error when trying to connect develop apps api

always get error when trying to connect develop apps api

hvl373
Visitor
1 0 0

Hi i want to figure out, where is the problem, I already create, set permission and install the application at my store, but i always getting error like 

{'errors': '[API] Invalid API key or access token (unrecognized login or wrong password)'}

 

this my code in python

code.png

 

 

 

 

 

 

 

 

 

 

 

 

 

and this is the configuration

ss product.png

 

can anyone help me tu figured out? the errors always like

err.png

 

Thankyou

Reply 1 (1)

garyrgilbert
Shopify Partner
428 41 178

Hi There,

 

I know that its possible to access the admin api by prefixing the url with the api token and access token but the best practic would be to add the access token as a header attribute and the URL would look like.

 

https://[your myshopify domain]/admin/api/[api-version]/[endpoint]

 

Take a look at this example from the docs:

https://shopify.dev/docs/api/admin-rest#authentication

 

Cheers,

Gary

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution