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

How to create topics in telegram chat with telethon

`@loader.tds class testr(loader.Module): '''name''' strings = { "name": "test", } async def client_ready(self, client, db): self.test_channel, _ = await utils.asset_channel( self._client, "Test - chat", "check descr", silent=True, archive=True, _folder="m", ) await self.client(functions.channels.InviteToChannelRequest(self.test_channel, ['@my_bot'])) await self.client(functions.channels.EditAdminRequest( channel=self.test_channel, user_id="@my_bot", admin_rights=ChatAdminRights(ban_users=True, post_messages=True, edit_messages=True),…

VIEW QUESTION
Back To Top
Search