Skip to content
TasksMate Developers

0.x — pre-release, no compatibility promise yet.What this means

POST/oauth/token

Exchange an authorization code (with its PKCE verifier) or a refresh token for an access token and a new refresh token. Errors are OAuth JSON (error, error_description).

Media typeapplication/x-www-form-urlencoded
TokenRequest
object
grant_type
required
string
Allowed values: authorization_code refresh_token
code

Authorization_code: the code from the redirect

string
redirect_uri

Authorization_code: exactly the one in the authorization request

string
code_verifier

Authorization_code: the PKCE verifier (43-128 characters)

string
refresh_token

Refresh_token: the current refresh token (single use)

string
scope

Refresh_token: optional, narrower scopes (space-separated)

string
client_id

Required for a public app; a confidential app may send it with client_secret instead of HTTP Basic

string
client_secret

client_secret_post (or use HTTP Basic)

string

Successful Response

Media typeapplication/json
TokenResponse

Returned by oauth.token.

object
access_token
required
Access Token

A TasksMate access token (tm_live_…), 1 hour

string
token_type
Token Type
string
default: Bearer
Allowed value: Bearer
expires_in
required
Expires In

Seconds

integer
refresh_token
required
Refresh Token

tmr_… — single use: each refresh returns a new one

string
scope
required
Scope

Space-separated scopes this access token holds

string

Example

{
"access_token": "tm_live_Ab3xQ9eLr0v2Zk5n8WcHt1YpUo4MiGs7Fj6Da-_Bq0R",
"expires_in": 3600,
"refresh_token": "tmr_Zk5n8WcHt1YpUo4MiGs7Fj6Da-_Bq0RAb3xQ9eLr0v2",
"scope": "tasks:write projects:read",
"token_type": "Bearer"
}

An OAuth error (invalid_request, invalid_grant, invalid_scope, unsupported_grant_type)

Media typeapplication/json
OAuthErrorBody

A OAuthErrorBody object.

object
error
required
Error

Invalid_request · invalid_client · invalid_grant · unauthorized_client · unsupported_grant_type · invalid_scope

string
error_description
Any of:
string

Example

{
"error": "invalid_grant",
"error_description": "string"
}

Client authentication failed (invalid_client)

Media typeapplication/json
OAuthErrorBody

A OAuthErrorBody object.

object
error
required
Error

Invalid_request · invalid_client · invalid_grant · unauthorized_client · unsupported_grant_type · invalid_scope

string
error_description
Any of:
string

Example

{
"error": "invalid_grant",
"error_description": "string"
}