Twitter Denying Access for create_tweet()
await client.create_tweet(text="reply here", reply_to="432432")
gets this error
Traceback (most recent call last):
File "/Users/kevinsims/Code/twitter-automate/index.py", line 141, in
Looks like twitter is restricting usage
added a print to twitkit/client/client.py
python response, _ = await self.gql.create_tweet( is_note_tweet, text, media_entities, poll_uri, reply_to, attachment_url, community_id, share_with_followers, richtext_options, edit_tweet_id, limit_mode ) print(response) _result = response['data']['create_tweet']['tweet_results']
Got
python {'errors': [{'message': "Authorization: This request looks like it might be automated. To protect our users from spam and other malicious activity, we can't complete this action right now. Please try again later. (226)", 'locations': [{'line': 18, 'column': 3}], 'path': ['create_tweet'], 'extensions': {'name': 'AuthorizationError', 'source': 'Client', 'code': 226, 'kind': 'Permissions', 'tracing': {'trace_id': '036e71f21ad8f53d'}}, 'code': 226, 'kind': 'Permissions', 'nam'}}]
same problem
I have the same proble, sometimes the crate_tweet funtion fails
Error al enviar el tweet: 'create_tweet' Traceback (most recent call last): File "c:\proyectos\monitoreo de grupos de interés twitter\lobby_spain_twitter.py", line 266, in main tweet = await client.create_tweet(text, reply_to=reply_to) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USUARIO\anaconda3\Lib\site-packages\twikit\client\client.py", line 1241, in create_tweet _result = response['data']['create_tweet']['tweet_results'] ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: 'create_tweet'
did anyone find any fix for this?
fixed in v2.2.0
If someone still facing this issue, it might be because Twitter API doesn't work on new accounts. You need to make some post manually or complete the instructions which Twitter gives on new accounts to help grow it.