Campaigns GET is returning an invalid offset


#1

Hi all,

I have an application that is iterating through campaigns over a certain time-frame. It uses the returned offset parameter to continue moving through the dataset. However, more recently using the offset has given an error when attempting to re-enter it back into hubspot's system.

https://api.hubapi.com/email/public/v1/campaigns

&limit=10&offset=AQAAAWTQtzq8AAAAAAPZ+Go=

Returned data:
"hasMore": true,
"offset": "AQAAAWTQtzq8AAAAAAPZ+Go=",
"campaigns": [


#2

Hi @wtsik,

Can you give me your Hub ID and the full error response you're receiving when this issue occurs?


#3

The remote server returned an error: (400) Bad Request.{"status":"error","message":"invalid offset","correlationId":"c3cc6be8-7067-44fa-b65b-da9c96dd2578","requestId":"ee18604e6f86ca7d3856961f1d42d6f1"}

HubId = 2802745


#4

Hey @wtsik --

This is typically because the + sign isn't encoded as a %2b in the url query parameter.


#5

Thanks! That fixed it.