skip to Main Content

Twitter-api – 403 Forbidden – Tweepy Authentication error when attempting to access tweet/user data with client.get_user()

import tweepy import os api_key = os.getenv('TWI_API_KEY') api_key_secret = os.getenv('TWI_API_KEY_SECRET') bearer_token = os.getenv('TWI_BEARER_TOKEN') access_token = os.getenv('TWI_ACCESS_TOKEN') access_token_secret = os.getenv('TWI_ACCESS_TOKEN_SECRET') client = tweepy.Client(bearer_token=bearer_token, consumer_key=api_key, consumer_secret=api_key_secret, access_token=access_token, access_token_secret=access_token_secret) user_get = client.get_user(username='twitterusers') user_id = user_get.data.id print(user_id) Above, is the code I've written so…

VIEW QUESTION

Twitter-api – issue with Twitter API :

I am getting below error while trying to run the python script to replay a tweet on my account. import tweepy #Consumer keys and access tokens, used for OAuth API_KEY = “MY_API_KEY” API_SECRET_KEY = “MY_API_SECRET_KEY” ACCESS_TOKEN = “MY_ACCESS_TOKEN” ACCESS_TOKEN_SECRET =…

VIEW QUESTION
Back To Top
Search