skip to Main Content

Why I get forbidden error for only reading home timeline? – Twitter API

My code is as simple as this, but it gave me 403 error: def init_api(): api = json.load(open('secret.json'))['twitterapi'] consumer_key = api['api_token'] consumer_secret = api['api_secret'] access_token = api["access_token"] access_token_secret = api["access_secret"] bearer_token = api["bearer_token"] auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api…

VIEW QUESTION

Post tweets using tweepy and Twitter API V2

I need my Twitter app to tweet some information, but something is going wrong. First, I created an app and tried this code to test credentials: auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET") auth.set_access_token("ACCESS_TOKEN", "ACCESS_SECRET") api = tweepy.API(auth) try: api.verify_credentials() print("Authentication Successful") except:…

VIEW QUESTION
Back To Top
Search