Skip to content

V2 Client authorization fails with 429 error #226

Description

@DougX71

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pyticktick.

Reproducible example

I am using the same code as provided on the landing page for https://pyticktick.pretzer.io/ but edited to have my username and password:

from pyticktick import Client

client = Client(v2_username="username", v2_password="password")
resp = client.get_batch_v2()

Log output

I:\Inspiron copy\Doug\TickTickAPIUsage>py pytt_get_projects_and_tasks_from_test_account.py
2025-12-15 11:30:32.959 | WARNING  | pyticktick.settings:_get_v1_token:470 - Cannot signon to v1 without `v1_client_id` and `v1_client_secret`
C:\Users\Doug7\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pyticktick\settings.py:471: UserWarning: Cannot signon to v1 without `v1_client_id` and `v1_client_secret`
  warnings.warn(msg, UserWarning, stacklevel=1)
2025-12-15 11:30:33.458 | ERROR    | pyticktick.settings:_v2_signon:359 - Response [429]:

Traceback (most recent call last):
  File "I:\Inspiron copy\Doug\TickTickAPIUsage\pytt_get_projects_and_tasks_from_test_account.py", line 12, in <module>
    client = Client(v2_username="xxx", v2_password="yyy")
  File "C:\Users\Doug7\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pydantic_settings\main.py", line 194, in __init__
    super().__init__(
  File "C:\Users\Doug7\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pydantic\main.py", line 250, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Client
  Value error, Response [429]:
 [type=value_error, input_value={'v2_username': 'xxx': 'yyy'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.12/v/value_error

Issue description

In the log output I have edited my username and password to xxx and yyy respectively for privacy, but I will send the unedited log to the developer.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions