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.

Admin Orders API doesn't work correctly

Admin Orders API doesn't work correctly

Vi-WizzCommerce
Shopify Partner
133 7 20

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?

 

 

Check here Wizzcommerce Apps to optimize your store: Snap Presale & Backorder | SnapNoti FOMO Visitor Counter | SnapBundle Volume Discounts | Wizz Flash Sale & Price Edit | BOGO+ | Buy X Get Y Free Gift
Find more support, feel free to contact: support@wizzcommerce.io
Replies 4 (4)

KarlOffenberger
Shopify Partner
1873 184 903

Hi Vince

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

Hope that helps!

Vi-WizzCommerce
Shopify Partner
133 7 20

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?

Check here Wizzcommerce Apps to optimize your store: Snap Presale & Backorder | SnapNoti FOMO Visitor Counter | SnapBundle Volume Discounts | Wizz Flash Sale & Price Edit | BOGO+ | Buy X Get Y Free Gift
Find more support, feel free to contact: support@wizzcommerce.io

KarlOffenberger
Shopify Partner
1873 184 903

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.

Vi-WizzCommerce
Shopify Partner
133 7 20

@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!

Check here Wizzcommerce Apps to optimize your store: Snap Presale & Backorder | SnapNoti FOMO Visitor Counter | SnapBundle Volume Discounts | Wizz Flash Sale & Price Edit | BOGO+ | Buy X Get Y Free Gift
Find more support, feel free to contact: support@wizzcommerce.io