The first request returns a paging similar to above. The first and second requests return new data. Then the paging link is not updated after that and I am getting duplicates returned.
First GET request returns a handful of messages (with or without setting the limit)
First GET request has after and link values
Second GET request with after token returns a new token
Third GET returns the same result as the second, including the token
I just noticed seomthing else testing with a new thread id. The second GET results returned an empty array, yet there's a paging link. And the paging link duplicates the second GET request. It's as if there's no results left yet it's setting a paging link anyway.
Hey, @MHenderson42👋 Welcome to our community! Thanks for your question.
Have you tried:
Try limiting records to a smaller number, 5 or 10, and see if the issue persists. /conversations/v3/conversations/threads/{threadId}/messages?limit=10&sort=createdAt&after={afterToken}
If no duplicates are returned, gradually increase the limit (to 50, 100, etc.) until you start seeing duplicates again.
Another test to try is not passing the after token and see if duplicates start from first request itself or after a few batches.
This will give you a better idea of whether the issue is related to the 'limit' parameter, the 'after' token or is a different issue.