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

Getting Tweets with Bearer Token is not working

Open toramanomer opened this issue 1 year ago • 0 comments

Describe the bug Getting Tweets with Bearer token is not working. It returns 403 Forbidden with the following response body:

{
    "client_id": "28572299",
    "detail": "When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.",
    "registration_url": "https://developer.twitter.com/en/docs/projects/overview",
    "title": "Client Forbidden",
    "required_enrollment": "Appropriate Level of API Access",
    "reason": "client-not-enrolled",
    "type": "https://api.twitter.com/2/problems/client-forbidden"
}

To Reproduce

  • Create Project on Twitter Developer Portal
  • Create App for Project
  • Add Bearer Token
  • Make request, and observe it is returning 403 Forbidden

Expected behavior A successful response with the requested tweets.

Additional context Add any other context about the problem here.

toramanomer avatar Mar 25 '24 18:03 toramanomer