latestOpenAPI 3.1.02026-08-211061591.1 MB

69a962f1578f

Authorization

Migrate Personal Token

Tokens obtained via the old email/password authentication method can be migrated to the new OAuth access token. Migrating your users' personal tokens will allow users to see your app in their Todoist Settings page and give them the ability to manage their app authorization.

A successful response has 200 OK status and application/json Content-Type.

post/api/v1/access_tokens/migrate_personal_token

Request body

client_idstring required

The unique Client ID of the Todoist application that you registered.

client_secretstring required

The unique Client Secret of the Todoist application that you registered.

personal_tokenstring required

Token obtained from the email/password authentication.

scopestring required

Scopes of the OAuth token. Please refer to the Authorization guide for the detailed list of available scopes.

Example request

{
  "client_id": "0123456789abcdef",
  "client_secret": "abcdef0123456789abcdef0123456789",
  "personal_token": "0123456789abcdef0123456789abcdef01234567",
  "scope": "data:read_write"
}

Response

Successful Response

access_tokenstring nullable required

OAuth access token created from the personal token.

token_type'Bearer' required

OAuth token type.

expires_ininteger required

Access token lifetime in seconds.

Example response

{
  "access_token": "0123456789abcdef0123456789abcdef01234567",
  "token_type": "Bearer",
  "expires_in": 315360000
}