> For the complete documentation index, see [llms.txt](https://docs.patchmypc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.patchmypc.com/patch-my-pc-cloud-api/create-a-personal-access-token.md). Agents can also search and read this documentation through its [MCP server](https://docs.patchmypc.com/~gitbook/mcp).

# Create a personal access token

Create, view, and revoke personal access tokens for the Cloud Customer API in the Patch My PC portal.

[Back to the Cloud Customer API overview](https://docs.patchmypc.com/patch-my-pc-cloud-api)

A personal access token (PAT) lets your scripts, services, and pipelines call the Patch My PC Cloud Customer API without anyone at the keyboard. You create, view, and revoke PATs in the Patch My PC portal. You then exchange a PAT for a short-lived access token, as described in [Authentication](https://docs.patchmypc.com/patch-my-pc-cloud-api/authentication.md).

## Before you begin

* Make sure you can open **Settings** > **Access Tokens** in the Patch My PC portal. If you don't see **Access Tokens**, ask an administrator for access.
* Decide which [scopes](#choose-scopes) your job needs. A token can never do more than the person who created it, so you can only grant scopes that your own account is allowed to use.

## Open the Access Tokens page

1. Sign in to the Patch My PC portal.
2. Go to **Settings** > **Access Tokens**.

The **Personal Access Tokens** page lists the tokens for your company.

![The Personal Access Tokens page in Settings](https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FzTs0obHRVXOcxZj0ZQwm%2Faccess-tokens-list.png?alt=media)

| Column                   | Shows                                                                                               |
| ------------------------ | --------------------------------------------------------------------------------------------------- |
| **Name**                 | The name you gave the token.                                                                        |
| **Token ID**             | The token's identifier. This isn't the token value, which is never shown again after you create it. |
| **Scopes**               | What the token is allowed to do.                                                                    |
| **Created**              | When the token was created.                                                                         |
| **Expires**              | When the token stops working.                                                                       |
| **Last Used**            | When the token was last used, or **Never** if it hasn't been used.                                  |
| **Status**               | **Active**, **Expired**, or **Revoked**.                                                            |
| Trash icon (last column) | Revokes the token.                                                                                  |

Revoked tokens are hidden by default. Select **Show revoked** to include them.

## Create a token

1. On the **Personal Access Tokens** page, select **Create Token**.
2. In the **Create Personal Access Token** dialog, fill in the fields:

   | Field               | What to enter                                                                                                      |
   | ------------------- | ------------------------------------------------------------------------------------------------------------------ |
   | **Name**            | Required. A name that describes what the token is for, for example `nightly-catalog-report`. Up to 100 characters. |
   | **Scopes**          | Required. Select at least one scope. For help choosing, see [Choose scopes](#choose-scopes).                       |
   | **Expires In Days** | The token's lifetime, from 1 to 365 days. If you leave it blank, the token lasts 90 days.                          |

   ![The Create Personal Access Token dialog](https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FWDWk4wuVnpCxms7dKwQx%2Fcreate-token-dialog.png?alt=media)
3. Select **Create**.
4. In the **Token Created** dialog, select **Copy**, and store the token value somewhere safe, for example in Azure Key Vault or your pipeline's secret variables.
5. Select **Done**.

   ![The Token Created dialog, with the token value hidden](https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FDhtTbypuHCvIm3wxCQA7%2Ftoken-created-dialog.png?alt=media)

{% hint style="warning" %}
The token value is shown only once. After you close the **Token Created** dialog, you can't retrieve it again. If you lose it, create a new token and revoke the old one.
{% endhint %}

Treat the token like a password: keep it in a secret store, and never write it to source control or logs.

## Choose scopes

Scopes limit what a token can do. Select only the scopes your job needs.

| Scope in the portal              | Scope value                  | Lets the token                                                                                           |
| -------------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Read applications**            | `appcatbroker:apps:read`     | Search applications, read application details and files, and list your connections.                      |
| **Create & update applications** | `appcatbroker:apps:write`    | Create, update, edit, and delete custom applications. Also includes the access of **Read applications**. |
| **Deploy applications**          | `appcatbroker:apps:deploy`   | Read, create, edit, sync, pause, redeploy, and delete deployments, and manage deployment templates.      |
| **Read customer info**           | `appcatbroker:customer:read` | Read your account information and usage limits.                                                          |

The scope value is what the API reports in error responses and what the reference pages list under each operation's required scope.

You can only grant scopes that your own account is allowed to use. The portal can show a scope you aren't allowed to grant as unavailable, and a token is never granted a scope beyond your permissions, so check the **Scopes** column after you create a token. If you need a scope you can't grant, ask an administrator for the permission, or ask someone who has it to create the token.

You can't change the scopes of an existing token. To change them, create a new token with the scopes you need, update your automation to use it, and revoke the old token.

## Revoke a token

Revoke a token when you no longer need it, when you replace it, or if you think it was exposed.

1. On the **Personal Access Tokens** page, find the token.
2. At the end of the token's row, select the revoke (trash) icon.
3. When you're asked to confirm, select **Yes**.

   ![The confirmation to revoke a token](https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FRDB6wZIqQ5CJ4XAroBEZ%2Frevoke-token-confirm.png?alt=media)

Revoking takes effect immediately: any automation using the token loses access. You can't undo a revocation.

## Replace a token before it expires

A token stops working when it expires. To avoid an interruption:

1. Create a new token with the same scopes.
2. Update your secret store or pipeline variable with the new value.
3. Confirm your automation runs with the new token.
4. Revoke the old token.

## Next steps

* [Authentication](https://docs.patchmypc.com/patch-my-pc-cloud-api/authentication.md): exchange the token for an access token and send it with each request.
* [Automate with a personal access token](https://docs.patchmypc.com/patch-my-pc-cloud-api/guides/automate-with-a-personal-access-token.md): run a scheduled job with a token.


---

# 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.patchmypc.com/patch-my-pc-cloud-api/create-a-personal-access-token.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.
