Skip to content

Commit 202017d

Browse files
committed
docs: update api token section
1 parent c518b6b commit 202017d

File tree

8 files changed

+19
-0
lines changed

8 files changed

+19
-0
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading

sources/platform/integrations/programming/api.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ You are not required to those packages—the REST API works with any HTTP client
2222

2323
To access the Apify API in your integrations, you need to authenticate using your secret API token. You can find it on the [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.
2424

25+
26+
2527
![Integrations page in Apify Console](../images/api-token.png)
2628

2729
:::caution
@@ -38,6 +40,23 @@ You can authenticate the Apify API in two ways. You can either pass the token vi
3840
Note that some API endpoints, such as [Get list of keys](/api/v2#/reference/key-value-stores/key-collection/get-list-of-keys),
3941
do not require an authentication token because they contain a hard-to-guess identifier that effectively serves as an authentication key.
4042

43+
## Expiration
44+
45+
API tokens support enhanced security features to help protect your account and data. You can set an expiration date for your API tokens, ensuring they automatically become invalid after a specified period. This is particularly useful for temporary access or when working with third-party services.
46+
47+
![Creating token with expiration date in Apify Console](../images/api-token-expiration-date.png)
48+
49+
## Rotation
50+
51+
If you suspect that a token has been compromised or accidentally exposed, you can rotate it through the Apify Console. When rotating a token, you have the option to keep the old token active for 24 hours, allowing you to update your applications with the new token before the old one becomes invalid. After the rotation period, the token will be regenerated, and any applications connected to the old token will need to be updated with the new token to continue functioning.
52+
53+
![Rotate token in Apify Console](../images/api-token-rotate.png)
54+
55+
For better security awareness, tokens that have been identified as leaked are marked in the UI, making it easy to identify and take action on compromised tokens.
56+
57+
![Leaked token in Apify Console](../images/api-token-leaked.png)
58+
59+
4160
## Organization accounts
4261

4362
When working under an organization account, you will see two types of API tokens on the Integrations page.

0 commit comments

Comments
 (0)