Admin Orders API doesn't work correctly

VinceNg
Shopify Partner
125 4 19

Hi everyone,

I've tried to create a private app to access to the list of our client orders.

But on my demo shop, when I tried to access to the URL it works. For exmple: https://b678d995f7df8a6dfd2827cccbaeea95:0c541b20a9a48b9f4d1b4a754d416ebd@monngonmoingay.myshopify.c...

But on my customer shopify plus site, it doesn't work => It redirect to admin login page.

Anyone have any idea?

 

 

Vince Nguyen | Ecommerce Consultant at HappyPoints.io
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution
Email me at: vince@happypoints.io
Skype: vince@happypoints.io
Replies 4 (4)

KarlOffenberger
Shopify Partner
1873 184 901

Hi Vince

Try clearing your cookies. This usually happens when you have cookies from another Shopify session lingering around.

Hope that helps!

VinceNg
Shopify Partner
125 4 19

Hi Karl,

Thanks, you're correct. If I access directly on the URL it showed the json data. But if I use jquery to read it, it required login again. Do you have any idea?

Vince Nguyen | Ecommerce Consultant at HappyPoints.io
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution
Email me at: vince@happypoints.io
Skype: vince@happypoints.io

KarlOffenberger
Shopify Partner
1873 184 901

Vince

Not sure about jQuery. Beyond the brutish aproach of trying to null the offending cookie, I can't tell what the reason or good solution is.

Though I do wonder why you'd use jQuery to make requests to the Admin API? AFAIK, that isn't recommended and apart from the issue you're seeing now, you may run in to CORS issues and more worrying, you're passing down your access token and password to the client - which btw. I'd edit out of your post above as well.

VinceNg
Shopify Partner
125 4 19

@Karl 

Thank you so much. That's my demo store only so nothing values here. For client site I will never publish it.

The reason is that when I tried to get customer's order information and show to the customer with Shopify API, it doesn't work and required to login. Then I tried with private app to see, and it is the same.

Thanks for your support!

Vince Nguyen | Ecommerce Consultant at HappyPoints.io
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution
Email me at: vince@happypoints.io
Skype: vince@happypoints.io