Skip to content

Auth error code 399 twikit v2.2.0 #281

Closed
@rob11030o

Description

Using twikit v2.2.0 (latest)

await xclient.login(
    auth_info_1=USERNAME,
    auth_info_2=EMAIL,
    password=PASSWORD,
    totp_secret=TOTP_SECRET
)

getting:

Traceback (most recent call last):
  File "/Users/robin/Projects/python-lib/twitter/main2.py", line 33, in <module>
    asyncio.run(main())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/robin/Projects/python-lib/twitter/main2.py", line 22, in main
    await xclient.login(
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/client.py", line 439, in login
    await flow.execute_task({
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/utils.py", line 88, in execute_task
    response, _ = await self._client.v11.onboarding_task(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/v11.py", line 90, in onboarding_task
    return await self.base.post(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/client.py", line 214, in post
    return await self.request('POST', url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/client.py", line 185, in request
    raise BadRequest(message, headers=response.headers)
twikit.errors.BadRequest: status: 400, message: "{"errors":[{"code":399,"message":"Incorrect. Please try again. g;173619650519173336:-1736196505414:ypaxvTcvdL0g48L0oIb4f6bK:9"}]}"

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