Skip to content

OAuth#

pyticktick.models.v1.responses.oauth #

Pydantic response models for the OAuth2 flow in the V1 API.

Classes:

Name Description
OAuthTokenV1

Response of the POST request in the third step of the OAuth2 flow.

OAuthTokenV1 pydantic-model #

Bases: BaseModel

Response of the POST request in the third step of the OAuth2 flow.

Show JSON schema:
{
  "description": "Response of the POST request in the [third step](https://developer.ticktick.com/docs#/openapi?id=third-step) of the OAuth2 flow.",
  "properties": {
    "access_token": {
      "description": "OAuth2 access token for the V1 API.",
      "format": "uuid4",
      "title": "Access Token",
      "type": "string"
    },
    "expires_in": {
      "description": "Access token expiration time in seconds from the time of issue. Usually lasts 6 months.",
      "title": "Expires In",
      "type": "integer"
    },
    "token_type": {
      "const": "bearer",
      "default": "bearer",
      "description": "Fixed value 'bearer'.",
      "title": "Token Type",
      "type": "string"
    },
    "scope": {
      "const": "tasks:read tasks:write",
      "default": "tasks:read tasks:write",
      "description": "Spaces-separated permissions for the generated token. The currently available scopes are 'tasks:write' and 'tasks:read'. Default is 'tasks:read tasks:write'.",
      "title": "Scope",
      "type": "string"
    }
  },
  "required": [
    "access_token",
    "expires_in"
  ],
  "title": "OAuthTokenV1",
  "type": "object"
}

Config:

  • extra: ignore

Fields:

access_token pydantic-field #

access_token: UUID4

OAuth2 access token for the V1 API.

expires_in pydantic-field #

expires_in: int

Access token expiration time in seconds from the time of issue. Usually lasts 6 months.

scope pydantic-field #

scope: Literal["tasks:read tasks:write"] = (
    "tasks:read tasks:write"
)

Spaces-separated permissions for the generated token. The currently available scopes are 'tasks:write' and 'tasks:read'. Default is 'tasks:read tasks:write'.

token_type pydantic-field #

token_type: Literal['bearer'] = 'bearer'

Fixed value 'bearer'.