> For the complete documentation index, see [llms.txt](https://docs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akinon.com/tutorials/app-maker/developer-tools-and-cli/user-access-tokens.md).

# User Access Tokens

User access tokens are long-lived API tokens for authenticating with App Maker from outside the web UI — the App Maker CLI, CI pipelines, or direct API calls. They complement [SSH public keys](/tutorials/app-maker/developer-tools-and-cli/add-public-key.md): the SSH key grants git access to project repositories, while the access token authenticates platform API operations.

## Creating a Token

1. Open your account menu and go to **User Access Tokens**.
2. Click **Create**.
3. Fill in:
   * **Organization** — the organization the token is created for. App Maker preselects the organization you are working in. This field is shown only when you belong to more than one active organization; otherwise the token is created for your only organization.
   * **Name** — a label identifying where the token will be used (e.g. `ci-pipeline`, `laptop-cli`).
   * **Lifetime** — how long the token stays valid: one week, one month, three months, six months, or one year.
   * **Privileges** — the permission scopes granted to the token. The list offers only the privileges you hold in the chosen organization; if you change the organization, privileges the new one does not give you are removed from your selection. Grant only what the consumer needs; a CI token that only triggers builds does not need user-management privileges.
4. Confirm. The token value is displayed **once** — copy it immediately and store it in a secret manager. It cannot be retrieved again later.

## Managing Tokens

The token list shows the tokens of one organization at a time: the organization you are working in, or the one you pick in the **Organization** field above the list when you belong to more than one active organization. Each row shows the token's name, its organization, creation date, and expiry. Tokens cannot be edited — to change lifetime or privileges, create a new token and revoke the old one.

* **Revoke** — delete a token to invalidate it immediately. Any CLI or CI job using it will start receiving authentication errors.
* **Expiry** — tokens expire automatically at the end of their lifetime; rotate tokens used in CI before their expiry date.

## Using a Token with the CLI

The App Maker CLI uses the token to authenticate platform operations. See the AppMaker CLI documentation for the login/configuration command, and [Setup Existing Project on CLI](/tutorials/app-maker/developer-tools-and-cli/setup-existing-project-on-cli.md) for the full local setup flow.

## Using a Token with the API

Pass the token in the `x-access-token` header. This is an alternative to the `Authorization: Bearer <jwt>` header a signed-in web session uses — send one or the other, not both. When both are present the session JWT wins and the access token is ignored.

The API base URL is `https://abp.akinon.net/api/v1`.

```bash
curl https://abp.akinon.net/api/v1/organizations/<organizationId>/projects \
  -H "x-access-token: <your-token>"
```

Two rules govern what the token can reach:

* **It is bound to one organization.** A token works only against the organization it was created in. Pointing it at a different organization's `:organizationId` returns `403`, and this holds regardless of how much access the person who created the token has — a token is never wider than the organization it was issued for. To work with a second organization, create a token for it by choosing that organization in the **Organization** field.
* **It carries only the privileges you granted it.** The privileges chosen at creation are the ceiling, even when the creating user has more. A request needing a privilege the token lacks returns `403`.
* **It cannot create a wider token.** A token can create another token only with privileges it holds itself.
* **Owner-only actions need a signed-in session.** Creating, editing, or deleting **roles** works only from the App Maker web app while you are signed in, not with a token.

A token whose organization membership was removed after the token was created also stops working, even before its lifetime expires.

## Security Notes

* Treat tokens like passwords: never commit them to a repository or paste them into shared documents.
* Prefer short lifetimes and narrow privileges; create separate tokens per consumer so one can be revoked without breaking the others.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akinon.com/tutorials/app-maker/developer-tools-and-cli/user-access-tokens.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
