I’m starting to update the code for this API Key sunsetting. (Kind of annoyed with this…)
I have OAuth working and I’m storing the tokens in a database and refreshing every hour roughly. That’s fine.
My app has 1016 tags but we can only request 1000 tags at a time so I have to make two requests to get the complete list.
In the past, I used dsQuery with offsets to request each subsequent set of tags.
With my OAuth login, it looks like it’s using the V1 REST API which doesn’t have dsQuery. It does have a tags() method and it looks like it’s supposed use limit and offset, but it doesn’t work. Here’s what I’m using…
What you need to do is to set “$offset = 0;” at the start. Then in your “do” loop you need to increment “$offset” by the “$limit” value. That will set the starting point to the next 100 records.
Try this code out below. The “while” statement added as well.
The Keap PHP SDK is stuck on REST v1, due to the ongoing development of REST v2. When Keap are comfortable that that v2 matches the functionality of v1 they will swap it over.