Skip to content

Fatal Error: tweety.exceptions.GuestTokenNotFound: Page not Found. Most likely you need elevated authorization to access this resource #276

@yd-mark

Description

@yd-mark

An authentication error occurred.
The same error occurred when sign_in with username and password or *token since 2025/09/26.

example

async def token_auth():
    app = TwitterAsync("test.tw_session")
    await app.load_auth_token("...53819")
    print(app.me.username)

async def u_p_auth():
    app = TwitterAsync("cache/session")
    me = await app.sign_in(username, password)

error:

File "..../test/test_tweety.py", line 291, in token_auth
    await app.load_auth_token("5.......3819")
  File "...../.venv/lib/python3.12/site-packages/tweety/auth.py", line 132, in load_auth_token
    return await self.load_cookies(temp_cookie)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "......python3.12/site-packages/tweety/auth.py", line 115, in load_cookies
    return await self.connect()
           ^^^^^^^^^^^^^^^^^^^^
  File ".....python3.12/site-packages/tweety/auth.py", line 22, in connect
    self.user = await self.request.verify_cookies()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "........python3.12/site-packages/tweety/http.py", line 321, in verify_cookies
    response = await self.__get_response__(**data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".....python3.12/site-packages/tweety/http.py", line 185, in __get_response__
    await self._init_local_api()
  File ".....python3.12/site-packages/tweety/http.py", line 179, in _init_local_api
    self._guest_token = await self._get_guest_token()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".....python3.12/site-packages/tweety/http.py", line 316, in _get_guest_token
    raise GuestTokenNotFound(response=this_response, message=f"Guest Token couldn't be found")
tweety.exceptions.GuestTokenNotFound: Page not Found. Most likely you need elevated authorization to access this resource

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions