0

I am trying to make twitter API request from MAC Terminal using curl. I already made developer account, and obtained all keys and tokens.

In documentation they provided code to make request. This is the code:

curl --request GET 'https://api.twitter.com/2/tweets/search/recent?query=from:twitterdev' --header 'Authorization: Bearer $BEARER_TOKEN' 

Instruction is to substitute $BEARER_TOKEN with actual Token, which I did. However I get back this :

{"client_id":"27180208","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"}%

What is the solution and why is it not letting me to obtain data?

juliomalves
  • 42,130
  • 20
  • 150
  • 146

0 Answers0