Search code examples
apitwitterapache-nifi

Apache nifi getTwitter Processor returning 403 forbidden


I want to use Apache Nifi to track real time tweets i pasted in my keys correctly but all requests return this error :

19:15:20 UTC ERROR
GetTwitter[id=59b5cb18-017e-1000-a6a2-991a653ec138] Received error HTTP_ERROR: HTTP/1.1 403 Forbidden. Will attempt to reconnect

i dont know where the problem is from. thank you.


Solution

  • 403 Forbidden means the Twitter API is rejecting your request - your access keys could be incorrect, or you might not have the right access rights for the endpoint you're accessing.

    The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why.
    
    Check that your developer account includes access to the endpoint you’re trying to use. You may also need to get your App allowlisted (e.g. Engagement API or Ads API) or sign up for access.
    

    From https://developer.twitter.com/en/support/twitter-api/error-troubleshooting

    Make sure you follow the advice from Twitter here and make note of:

    With Essential access, you are only able to make requests to the Twitter API v2 endpoints, and not the v1.1 or enterprise endpoints. You are limited to 500K Tweets/month, and unable to take advantage of certain developer portal functionality such as teams and access to additional App environments
    

    There are limits on what you can do with the Essential access level. See here.

    If that doesn't help - please include a screenshot of your GetTwitter config and your version of NiFi.