Skip to content
DocsAuthentication

Get started

Authentication

Personal API keys and OAuth 2.1. How to send a credential, which one to choose, scopes, project-limited keys, expiry, revocation, and what each failure means.

Updated View as Markdown

On this page

Every request to the API (except the index and OpenAPI document) and to the MCP server carries a credential:

HTTP
Authorization: Bearer <token>

There are two kinds:

CredentialLooks likeMade byBest for
Personal API keytlk_ and 62 more charactersYou, in Taskloader → Account settings → API keysYour own scripts, cron jobs, CI, and MCP clients you configure yourself
OAuth access tokentlo_at_…An app, after you approve it on Taskloader's consent screenApps people connect to their account: Claude, ChatGPT, your own product

Both act as you, with your role in each project. A credential can do less than you can, never more.

Which one to choose

#
You are buildingUse
A script, scheduled job or CI step that works with your own projectsAn API key
An MCP setup for yourself in Claude Code, Cursor or VS CodeEither: an API key in a header, or the client's own OAuth sign-in. See MCP.
An app or integration other people connect to their Taskloader accountOAuth
Anything that runs in a browser or on a phoneOAuth with PKCE. Never ship an API key in client code: anyone can read it there.

Sending a credential

#
  • Send it only in the Authorization header, with the Bearer scheme.
  • Never put a token in a URL. A request that carries a token in its URL (as access_token, or a Taskloader token under any name or in the path, such as ?api_key=tlk_…), or access_token in a form body, is refused with 400 token_in_url and the token is not used. URLs end up in logs, browser history and Referer headers, so revoke a token that was sent this way.
  • Send one Authorization header with one token.
  • The API and the MCP server never read cookies. Being signed in to Taskloader in a browser does not authorize an API request.

Check that a credential works with GET /me. It returns the person, the credential's type, scopes, project limit and expiry:

Shell
curl https://taskloader.com/api/v1/me \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"

API keys

#

A personal API key is a long random secret that acts as you. You make keys in the app only: no API or MCP operation can create, list or revoke keys, so a leaked credential cannot make itself another one.

Creating a key

#
  1. In Taskloader, choose Account settings in your account menu, then API keys.
  2. Choose Create key, give it a name you will recognize later (CI deploy notes, Laptop), and choose:
    • What it can do: a preset or your own selection of scopes.
    • Projects: All my projects, including new ones, or Only these projects (see Project-limited credentials).
    • Expires: 7 days, 30 days, 90 days or 1 year (90 days by default).
  3. Copy the key. Taskloader shows it once, and stores only a one-way hash of it.

Creating a key needs a confirmed email address and a recent sign-in (within the last 24 hours). If Taskloader asks you to sign in again first, that is why. You can have up to 25 active keys, and create at most 50 keys in any 24 hours.

PresetScopes
Read onlyprojects:read, tasks:read, files:read
Work with tasksRead only, plus tasks:write, comments:write, files:write
EverythingAll eleven scopes
CustomThe scopes you tick

The key format

#
Text
tlk_Ab3dE6gH9jK2_<49 more letters and digits>

A key is 66 characters: tlk_, a 12-character lookup id, _, then a 43-character secret and a 6-character checksum. The checksum lets Taskloader (and secret scanners) reject a mistyped or made-up key without looking it up.

The key list shows each key as tlk_<lookup id>_…, with its scopes, projects, creation date, expiry and when it was last used. To find which row a key in your configuration belongs to, compare the first 17 characters.

Expiry, extending and revoking

#
  • Expiry is required. An expired key gets 401 with a detail saying it expired.
  • Reminders: Taskloader emails you 7 days and 1 day before a key expires (a key made or extended for 7 days gets only the one-day reminder).
  • Extend sets a new expiry: 7 days, 30 days, 90 days or 1 year from today. The key itself does not change, so nothing needs redeploying. Extending also needs a sign-in from the last 24 hours, and you can extend keys at most 100 times in any 24 hours.
  • Revoke works at once: the next request with that key gets 401.
  • Resetting your password revokes every API key, signs out every session and ends every OAuth app's access. Each app asks for your approval again, on the consent screen, when it reconnects. Taskloader emails you that it did.

Revoked and expired keys stay under Inactive keys for 90 days, then disappear.

Keeping keys safe

#
  • Keep keys in environment variables or your platform's secret store, never in source code or a repository.
  • Make one key per integration, so you can revoke one without breaking the others, and so task history says which integration made a change.
  • Give each key only the scopes and projects it needs, and the shortest expiry that works.
  • To rotate a key: create the new one, deploy it, check it works, then revoke the old one.
  • If a key leaks, revoke it straight away in Account settings → API keys.

Taskloader emails you whenever a key is created on your account. The email names the key, its access and its expiry, never the key itself.

Scopes

#

Scopes say what kind of access a credential has. Each one is a line on the consent screen and a checkbox on the key form.

ScopeLets the app or keyIncludesPre-ticked on consent
projects:readSee your organizations and projects, and the people in them (names, email addresses and roles)—Yes
projects:writeCreate organizations and projects, change project details, and leave projects or organizationsprojects:readYes
tasks:readSee tasks, checklists, comments, activity, bookmarks and charts—Yes
tasks:writeCreate, change, move and delete tasks, checklists and bookmarkstasks:readYes
comments:writeComment on tasks as you—Yes
files:readSee and download files attached to tasks—Yes
files:writeAttach files to tasks and delete themfiles:readYes
people:manageAdd and remove people in projects you manage, change their roles and create invitation linksprojects:readNo
organizations:manageManage organizations you administer: rename them, change people’s roles, remove people, create invitation links, and join any of their projects as an adminprojects:readNo
assistantAsk Taskloader’s assistant and read your conversations with it (both with See projects and See tasks; answers that name files need See files too), apply or dismiss its suggestions, and delete conversations (uses your hourly question allowance)—Yes
invitations:acceptAccept invitations to join projects and organizations for you—No
  • comments:write is separate from tasks:write: commenting as you is its own permission. A credential with comments:write but not tasks:read learns nothing about the task from its comment: the answer's task is null (only taskId names it), over MCP too.
  • files:read and files:write do not include tasks:read either: a credential without it gets a file's taskId but never its task's ref, so read_attachment's file.taskRef and attach_file's taskRef are null.
  • The changes feed (list_events) needs tasks:read; its member events carry userId and role only with projects:read.
  • Ask for the scopes that are not pre-ticked only when an integration needs them.
  • Asking Taskloader's assistant (ask_assistant), and reading its answers and conversations, need projects:read and tasks:read besides assistant, because answers quote the project. Without files:read, an answer is written without file names, and answers that read them (every answer to a question asked in the app) cannot be read: get_assistant_message answers insufficient_scope, and conversation lists leave them out. Dismissing suggestions and deleting conversations need only assistant; deleting answers the conversation’s title (its first question) only to a credential with projects:read and tasks:read, and null to any other. Applying suggestions needs assistant and each chosen change’s own scopes; without tasks:read (comments:write alone applies only comments) no result names its task: no ref, and “the task” in detail.
  • History names files only for a credential with files:read: without it, an entry about a file (in task and project history, get_task with include=activity, the project overview and the MCP tools) reads “attached a file” or “removed a file”.
  • GET /me needs no scope. It returns the person, the credential (type, scopes with the included ones, projects, expiry), which features this Taskloader has, and the request limits.
  • offline_access exists only for OAuth: it lets an app get refresh tokens. It is not an API scope.

The scope reference lists every operation and MCP tool under its scope, with the roles each needs.

What a credential can do

#

Taskloader checks every request in this order:

CheckQuestionWhen it fails
1. ScopeDid you grant this credential this kind of access?403 insufficient_scope, before anything is looked up
2. Account-level operationIs a project-limited credential asking for something outside any one project?403 credential_restricted
3. Project limitIs the project one the credential may use?404 not_found, exactly as if it did not exist
4. Your roleDoes your current role in the project allow it?404 not_found if you are not a member; 403 forbidden_role if your role is too low

Your role is read live on every request. If someone makes you a viewer, every credential you hold becomes viewer-level at once. If you leave a project, your credentials lose it too.

Project-limited credentials

#

A key made with Only these projects, or an OAuth app you connected with Only these projects, reaches only those projects:

  • Everything inside a chosen project works as usual, within the credential's scopes and your role.
  • Other projects look like they do not exist (404), and lists include only the chosen projects and the organizations that hold them.
  • Account-level operations are refused with 403 credential_restricted: creating organizations or projects, changing organizations, organization invitations, joining a project as an organization admin, leaving an organization, and previewing or accepting invitations. Over MCP, the tools for them are not listed at all.
  • A project-limited key cannot have organizations:manage or invitations:accept.
  • If you leave every chosen project, the credential reaches nothing. It never widens to your other projects.

You can change an app's projects later in Account settings → Connected apps; giving it more projects needs a sign-in from the last 24 hours, as approving it does. A key's projects are fixed: make a new key to change them.

OAuth

#

Use OAuth when other people connect your app to their Taskloader account. They click your app's Connect button, sign in to Taskloader, and see a consent screen that names your app, lists the access it asks for and offers a choice of projects. An app that publishes a client metadata document is named by its verified web address; any other app is marked Unverified app. When they choose Allow, your app receives an access token that lasts 1 hour and, if it asked for offline_access, a refresh token.

People see and manage every app in Account settings → Connected apps: what it can do, which projects, when it was last used. Disconnect stops it at once.

Taskloader is a standard OAuth 2.1 authorization server: authorization code with PKCE, refresh token rotation, client ID metadata documents and dynamic client registration, no client secrets. The details are in OAuth for apps, and Build an OAuth app walks through a working example.

MCP clients that support OAuth, such as Claude and ChatGPT, sign in through this same flow when you connect them to Taskloader's MCP server. See MCP.

When authentication fails

#

Authentication failures are 401 problems with a WWW-Authenticate challenge. A request without any credential gets a challenge without an error, which tells MCP clients and other OAuth clients where to sign in:

HTTP
HTTP/1.1 401 Unauthorized
Content-Type: application/problem+json
WWW-Authenticate: Bearer realm="taskloader", resource_metadata="https://taskloader.com/.well-known/oauth-protected-resource/api/v1", scope="projects:read projects:write tasks:read tasks:write comments:write files:read files:write people:manage organizations:manage assistant invitations:accept"

A token that was sent but does not work adds error="invalid_token" and an error_description. The problem's reason member says why:

Status and codereasonWhat happenedWhat to do
401 unauthenticatedNo Authorization header, or more than oneSend exactly one Authorization: Bearer <token> header.
401 invalid_tokeninvalidThe token is malformed, unknown or revoked. Unknown and revoked look the same on purpose.For a key: check you copied all 66 characters, or create a new key. For OAuth: refresh, or sign in again.
401 invalid_tokenexpiredAn API key or access token has expiredExtend the key, or create a new one. Use your refresh token to get a new access token.
401 invalid_tokenwrong_audienceAn OAuth token issued for the MCP server was sent to the REST API, or the other way roundRequest a token with resource=https://taskloader.com/api/v1 for the REST API. See Resources.
401 invalid_tokeninvalidA refresh token (tlo_rt_…) was sent as a bearer tokenExchange it at the token endpoint for an access token.
400 token_in_urlA token was in the URL (any parameter or the path), or access_token in a form bodyRevoke that token. Send tokens only in the Authorization header.
429 rate_limitedMany invalid tokens came from your addressWait Retry-After seconds and fix the credential. Valid credentials from the same address keep working.

Requests that authenticate but lack access fail with 403:

HTTP
HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
WWW-Authenticate: Bearer realm="taskloader", resource_metadata="https://taskloader.com/.well-known/oauth-protected-resource/api/v1", scope="files:write", error="insufficient_scope"
JSON
{
  "type": "https://taskloader.com/docs/api/errors#insufficient_scope",
  "title": "The credential lacks the required access",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This API key does not include files:write. Create a key with that access in Taskloader → Account settings → API keys.",
  "requiredScopes": ["files:write"],
  "grantedScopes": ["projects:read", "tasks:read", "files:read"],
  "…": "…"
}
CodeMeaningWhat to do
insufficient_scopeThe credential lacks a scope. requiredScopes lists what the operation needs.API keys cannot gain scopes: create a key with that access. Your own OAuth app: send the person through authorization again, asking for that scope (see OAuth for apps). MCP clients such as Claude: the person disconnects the app in Connected apps and connects it again, allowing that access.
credential_restrictedA project-limited credential asked for an account-level operation.Use a credential with access to all your projects.
forbidden_roleYour role in that project or organization does not allow it. requiredRole says which role would.Ask a project admin. Retrying will not help.