Invalid cursor, even though its valid

bug

#1

Hi,

This weekend our code that has been running fine for months all of a sudden stopped working. The “next_cursor” response parameter is there, but when i call to get the next load of tweets. i get this:

code:“INVALID_PARAMETER”
message:“Expected valid cursor, got “1rnyzh9dpts” for cursor”
parameter:“cursor”

1rnyzh9dpts is the cursor that was returned in the first call, so it should be valid.

The endpoint is /accounts/u0488/scoped_timeline

The ads account is u0488.

Please, any help is appreciated.


#2

Hi @KickstoneMusic ,

Is this still an on-going issue? I’m not seeing it though.
There’s a case we server this kind of error if your handle account (@ username) that used for authentication got suspended whatever for some reasons.

If it’s still reproducible for you, could you please provide us your full request including all URL parameters and raw response?

Best,
Shohei


#3

Hi @jrsyo

I can confirm this has happened at least the last 3 nights in a row.

Here is the full request for the first page

/4/accounts/u0488/scoped_timeline?user_id=50393960&tweet_mode=extended&count=200

the first response returns fine, and i get the cursor to return the next.

/4/accounts/u0488/scoped_timeline?user_id=50393960&tweet_mode=extended&count=200&cursor=1rnyzh9dpts

That one fails with the error from the first post. “Expected valid cursor, got “1rnyzh9dpts” for cursor”


#4

Hi @KickstoneMusic ,

Thanks for your update. But I still really want to see what is the actual JSON “response” data looks like. Could you please double check that you actually get 1rnyzh9dpts as a next_cursor value?
I hit the same endpoint with the exact same parameters but I’m seeing different cursor string and having no issues (testing with twurl). Also, it looks like you’re using v3 endpoint as well as v4 endpoint, so please make sure you’re hitting the same version at least.

Best,
Shohei


#5

Here is the response body:

Error {“errors”:[{“code”:“INVALID_PARAMETER”,“message”:“Expected valid cursor, got “1rnyzh9dpts” for cursor”,“parameter”:“cursor”}],“request”:{“params”:{“count”:1000,“cursor”:“1rnyzh9dpts”,“user_id”:“50393960”,“tweet_mode”:“extended”,“account_id”:“u0488”}}}