I am attempting to use R’s httr2 package to return a list of all mailing lists from the list mailing list endpoint. I am really struggling to leverage the httr2 iteration helpers in this context. Specifically, it seems the skipToken query parameter is encoded and I cannot simply use
iterate_with_offset(“skipToken”, offset = 100)
How should the skipToken value (the offset argument in the above line of code) be encoded to be recognized by the Qualtrics API?
Best answer by Nam Nguyen
@brianjiterate_with_offset only works for numeric-based pagination.
skipToken doesn’t just a page number, the skipToken is passed as a query parameter in each request after the first one. skipToken is a string: The value is provided by the API and you simply need to pass it in subsequent requests as a query parameter. The loop continues until skipToken becomes NULL, indicating there are no more pages of results to fetch.
@brianjiterate_with_offset only works for numeric-based pagination.
skipToken doesn’t just a page number, the skipToken is passed as a query parameter in each request after the first one. skipToken is a string: The value is provided by the API and you simply need to pass it in subsequent requests as a query parameter. The loop continues until skipToken becomes NULL, indicating there are no more pages of results to fetch.