Shopify API Private Apps Errors -

Kian_S
Visitor
2 0 1

Object

error:true
 
Good morning Guys,
 
i hope you're all good! I got some big issues with the API connection of private apps. I am trying to connect to our warehouse system. Everything worked fine, but it seems that it stops working some month ago.

This ist the error message i get from the warehouse system logs.

error_no:
400
 
error_msg:"stdClass Object ( [page] => page cannot be passed. See https://help.shopify.com/api/guides/paginated-rest-results for more information. ) "
 
error_file:"/var/www/global_vendor/ce66ac264ed1cfa6f26cdf047f9f4d8b/vendor/donutdan4114/shopify/src/Shopify/Client.php"
 
error_line:149
 
Trigger:"cli: artisan cron:run"
 
I hope you can help me to solve that. I am not a programmer, but i'll give my best to follow your advice.
 
Best
Kian
Replies 2 (2)

csam
Shopify Staff (Retired)
267 40 51

Hi @Kian_S 

Those error messages are coming from your application rather than from Shopify, so it's difficult to know for sure, but I believe this may be a result of "page" based pagination no longer being supported by the Shopify API. We have moved to cursor-based pagination, which a much more efficient way of retrieving large sets of data via the API. Basically, instead of making an API call ending in page=3 you'll need to change your app to use the newer page_info field.

So it would look something like this: 

https://shop-domain.myshopify.com/admin/api/2019-07/products.json?limit=50&page_info=eyJkaXJlY3Rpb24iOiJwcmV2IiwibGFzdF9pZCI6MTk4NTgyMTYzNCwibGFzdF92YWx1ZSI6IkFjcm9saXRoaWMgQWx1bWludW0gUGVuY2lsIn0%3DD
 

Here are some resources regarding how to implement this change:

https://www.shopify.ca/partners/blog/relative-pagination

https://shopify.dev/api/usage/pagination-rest

 

You may also want to read about our API versioning: https://shopify.dev/api/usage/versioning as well as how to follow along for any changes coming in future, via our Changelog: https://shopify.dev/changelog

 

To learn more visit the Shopify Help Center or the Community Blog.

Kian_S
Visitor
2 0 1

Hey Csam,

 

thank you for your reply. I will have a look over it and recheck that with our programmer. 

I will give you a feedback afterwards.

 

So for the moment thank you and have a good day.

 

Kian