Skip to content

Commit 1d1caa5

Browse files
marcel-rbroclaude
andauthored
docs: document show-once API tokens (#3227)
Apify Console now shows the value of an API token only once, right after you create or rotate it. Existing tokens can't be viewed or copied from the token list. ## Changes - **API integration page**: explains the show-once behavior, adds a **Create an API token** procedure (`#create-api-token`), covers what to do when a token is lost, notes that `apify login` creates its own token, and notes that rotation shows the new token only once. - **Account settings**: the **API & Integrations** section mentions that a token is shown only once. - **Organization accounts**: members can't see the value of their assigned token, so the page points them to creating or rotating one. - **API reference**: the OpenAPI Authentication intro and the `httpBearer` and `apiKey` security scheme descriptions say to create a token instead of finding an existing one. Updating the integration and tutorial pages that tell readers to copy their token from Console is in a follow-up PR stacked on this one. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 65dfbe2 commit 1d1caa5

6 files changed

Lines changed: 27 additions & 10 deletions

File tree

‎apify-api/openapi/components/securitySchemes/apiKey.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ in: query
44
description: |-
55
API token provided as a query parameter (e.g., `?token=your_token`—less secure).
66
7-
Use your API token to authenticate requests. You can find it on the [Integrations page](https://console.apify.com/account#/integrations) in Apify Console.
7+
Use your API token to authenticate requests. You can create one on the [Integrations page](https://console.apify.com/settings/integrations) in Apify Console. The Console shows the token only once, right after you create or rotate it, so copy it and store it somewhere safe.
88
99
:::danger Security
1010

‎apify-api/openapi/components/securitySchemes/httpBearer.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ scheme: bearer
33
description: |-
44
Bearer token provided in the `Authorization` header (e.g., `Authorization: Bearer your_token`—recommended). For details, see the [`Authorization` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) on MDN.
55
6-
Use your API token to authenticate requests. You can find it on the [Integrations page](https://console.apify.com/account#/integrations) in Apify Console. This method is more secure than query parameters, as headers are not logged in browser history or server logs.
6+
Use your API token to authenticate requests. You can create one on the [Integrations page](https://console.apify.com/settings/integrations) in Apify Console. The Console shows the token only once, right after you create or rotate it, so copy it and store it somewhere safe. This method is more secure than query parameters, as headers are not logged in browser history or server logs.
77
88
:::danger Security
99

‎apify-api/openapi/openapi.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ info:
4747
## Authentication
4848
<span id="/introduction/authentication"></span>
4949
50-
**You can find your API token on the
50+
**You can create an API token on the
5151
[Integrations](https://console.apify.com/settings/integrations) page in the
52-
Apify Console.**
52+
Apify Console.** The Console shows the token only once, right after you create
53+
or rotate it, so copy it and store it somewhere safe. For details, see
54+
[API token](https://docs.apify.com/integrations/api#api-token).
5355
5456
To use your token in a request, either:
5557

‎sources/platform/account/collaboration/organization/how_to_use.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ The organization, its Actors, and its integrations will keep running as they are
4040

4141
While you cannot manage an organization account's settings and members via API, you can access its Actor and task runs, webhooks, schedules, and storages just as you would with any other account.
4242

43-
As a member of an organization, you are assigned an [API token](/integrations) (under the **API & Integrations** tab) and proxy password (click the **Proxy** button in the left menu) for accessing the Apify platform via REST API.
43+
As a member of an organization, you are assigned an [API token](/integrations/api) (under the **API & Integrations** tab) and proxy password (select the **Proxy** button in the left menu) for accessing the Apify platform via REST API. Apify Console doesn't show the value of an existing token, so to use the API, [create a new token](/integrations/api#create-api-token) or [rotate](/integrations/api#rotation) the assigned one and copy it.
4444

4545
![Integration tokens](../images/organizations/integrations.png)
4646

47-
The API tokens' functionality reflects your account's permissions in the organization, so if you only have the **read** and **run** permissions for Actors, you will only be able to view and run Actors via API. Only you can view your API token and password.
48-
49-
> Do not share your API token or password with untrusted parties.
47+
The API tokens' functionality reflects your account's permissions in the organization, so if you only have the **read** and **run** permissions for Actors, you will only be able to view and run Actors via API. Only you can view your proxy password. Do not share your API token or proxy password with untrusted parties.
5048

5149
If you have the **manage organization access keys** permission, you are able to view and use organization-wide API tokens. These are shared across the organization, so everyone with the **manage organization access keys** permission can use them for organization-wide integrations.
5250

‎sources/platform/account/settings/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ In the **Session** section, you can adjust the session configuration. You can mo
4242

4343
## API & Integrations
4444

45-
The **API & Integrations** tab provides essential tools for accessing the Apify platform programmatically. Here, you can manage your **API tokens**, which are necessary for using the [Apify API](https://docs.apify.com/api/v2). The tab also shows **third-party apps and services** connected to your account, **account-level integrations**, and **Actor OAuth accounts**. For detailed guidance on utilizing these integrations, refer to the [Integrations documentation](https://docs.apify.com/integrations).
45+
The **API & Integrations** tab provides essential tools for accessing the Apify platform programmatically. Here, you can manage your **API tokens**, which are necessary for using the [Apify API](https://docs.apify.com/api/v2). Apify Console shows a token's value only once, right after you create or rotate it, so copy it and store it somewhere safe. For details, see [Create an API token](/integrations/api#create-api-token). The tab also shows **third-party apps and services** connected to your account, **account-level integrations**, and **Actor OAuth accounts**. For detailed guidance on utilizing these integrations, refer to the [Integrations documentation](https://docs.apify.com/integrations).
4646

4747
### MCP connectors
4848

‎sources/platform/integrations/programming/api.md‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,30 @@ You are not required to those packages - the REST API works with any HTTP client
1515

1616
## API token
1717

18-
To access the Apify API in your integrations, you need to authenticate using your secret API token. You can find it on the [API & Integrations](https://console.apify.com/settings/integrations) page in Apify Console. Give your token a reasonable description, and never use one token for several services, much like you shouldn't use the same password for different accounts.
18+
To access the Apify API in your integrations, you need to authenticate using your secret API token. You manage your tokens on the [API & Integrations](https://console.apify.com/settings/integrations) page in Apify Console. Give each token a reasonable description, and never use one token for several services, much like you shouldn't use the same password for different accounts.
1919

2020
![Integrations page in Apify Console](../images/api-token.png)
2121

22+
Apify Console shows the value of an API token only once, right after you create or [rotate](#rotation) it. The token list shows each token's description, but you can't view or copy the value of an existing token.
23+
24+
The Apify CLI doesn't need a copied token. When you sign in with [`apify login`](/cli/docs/reference#apify-auth-login--apify-login) in the browser, it creates a token for your device and stores it for you.
25+
2226
:::caution Protect your API token
2327
Do not share the API token with untrusted parties, or use it directly from client-side code,
2428
unless you fully understand the consequences! You can also consider [limiting the permission scope](#limited-permissions) of the token, so that it can only access what it really needs.
2529
:::
2630

31+
### Create an API token {#create-api-token}
32+
33+
1. Go to [**Settings > API & Integrations**](https://console.apify.com/settings/integrations) in Apify Console.
34+
1. In the **Personal API tokens** section, select **Create a new token**.
35+
1. Enter a description. Optionally, [limit the token's permissions](#limited-permissions) or [set an expiration date](#expiration).
36+
1. Select **Create**.
37+
1. Copy the token and store it somewhere safe, such as a password manager.
38+
1. Select **Done**.
39+
40+
If you lose a token, [rotate it](#rotation) to get a new value, or create a new token and delete the old one.
41+
2742
## Authentication
2843

2944
You can authenticate the Apify API in two ways. You can either pass the token via the `Authorization` HTTP header or the URL `token` query parameter. We always recommend you use the authentication via the HTTP header as this method is more secure.
@@ -43,6 +58,8 @@ If you suspect that a token has been compromised or accidentally exposed, you ca
4358

4459
![Rotate token in Apify Console](../images/api-token-rotate.png)
4560

61+
After you confirm the rotation, Apify Console shows the new token. This is the only time you can copy it, so store it somewhere safe.
62+
4663
For better security awareness, the UI marks tokens identified as compromised, making it easy to identify and take action on them.
4764

4865
![Leaked token in Apify Console](../images/api-token-leaked.png)

0 commit comments

Comments
 (0)