d60 / twikit

Twitter API Scraper | Without an API key | Twitter Internal API | Free | Twitter scraper | Twitter Bot

Home Page:https://twikit.readthedocs.io/en/latest/twikit.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error usign delegated account 403 on every action

degenwarsdali opened this issue · comments

I get an error while trying to use my delegated account

Everything I call generates this error.

"
Traceback (most recent call last):
 File "c:\Users\hp\Documents\degenwars\CODE\RPG_discord_bot-main\RPG_discord_bot-main\utils\xcom.py", line 48, in main
   user =  await client.user()
           ^^^^^^^^^^^^^^^^^^^
 File "C:\Users\hp\.conda\envs\xp_bot\Lib\site-packages\twikit\twikit_async\client.py", line 492, in user
   return await self.get_user_by_id(await self.user_id())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\hp\.conda\envs\xp_bot\Lib\site-packages\twikit\twikit_async\client.py", line 1516, in get_user_by_id
   response, _ = await self.get(
                 ^^^^^^^^^^^^^^^
 File "C:\Users\hp\.conda\envs\xp_bot\Lib\site-packages\twikit\twikit_async\client.py", line 170, in get
   return await self.request('GET', url, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\hp\.conda\envs\xp_bot\Lib\site-packages\twikit\twikit_async\client.py", line 153, in request
   raise Forbidden(message, headers=response.headers)
twikit.errors.Forbidden: status: 403, message: "{"errors":[{"message":"Contributor access is not permitted on this endpoint","code":90}]}
"```

I get the same error but without any message after the 403:Forbidden error. Maybe a change in the API Introduced breaking changes?

Traceback (most recent call last):
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/alyssa/Programs/APIs/Twitter/twikit_post.py", line 8, in apost
await client.create_tweet(
File "/home/alyssa/.local/lib/python3.10/site-packages/twikit/client/client.py", line 1217, in create_tweet
response, _ = await self.gql.create_tweet(
File "/home/alyssa/.local/lib/python3.10/site-packages/twikit/client/gql.py", line 221, in create_tweet
return await self.gql_post(endpoint, variables, features)
File "/home/alyssa/.local/lib/python3.10/site-packages/twikit/client/gql.py", line 139, in gql_post
return await self.base.post(url, json=data, headers=headers, **kwargs)
File "/home/alyssa/.local/lib/python3.10/site-packages/twikit/client/client.py", line 171, in post
return await self.request('POST', url, **kwargs)
File "/home/alyssa/.local/lib/python3.10/site-packages/twikit/client/client.py", line 149, in request
raise Forbidden(message, headers=response.headers)
twikit.errors.Forbidden: status: 403, message: ""