Invalid cursor, even though its valid




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:

message:“Expected valid cursor, got “1rnyzh9dpts” for 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.


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?



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


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


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


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.



Here is the response body:


  "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"


@KickstoneMusic No, I wanted to see your “first” API call response that includes the cursor id. Please make an API call without cursor id then provide us the cursor information from that response data.


Sorry for the late response, this issue is still happening though.

here is the response that contained the cursor…

  "request": {
    "params": {
      "account_id": "u0488"
  "next_cursor": "1rnyzh9dpts",
  "data": [
     …ommitted for brevity, there were 200 tweets