Twitter-API-v2-sample-code icon indicating copy to clipboard operation
Twitter-API-v2-sample-code copied to clipboard

User timeline API is not returning the right results

Open teshnizi opened this issue 2 years ago • 1 comments

Describe the bug I'm trying to pull the timeline for @Forbes from 2022-04-19 to 2022-05-19. The url I'm sending the requests to is as follows:

"https://api.twitter.com/2/users/Forbes/tweets?max_results=100&start_time=2022-04-19T00:00:00Z&end_time=2022-05-19T00:00:00Z"

The returned response is as follows:

{ "meta": { "result_count": 0 } }

However, there are some tweets in that period, including this one: https://twitter.com/Forbes/status/1518671125563199492

When I change the user ID (For example to "CNN"), it works just fine.

To Reproduce Go to Twitters Public Workspace on Postman, set your bearer token, and send the following request:

image

Additional context I tried different methods (python code on my laptop, postman, python code on google colab). I tried two different bearer auth tokens. Still getting the same empty response.

teshnizi avatar Jun 01 '22 18:06 teshnizi