Skip to content

Commit 7b4f4ba

Browse files
committed
docs: update api tokens
1 parent 31baff7 commit 7b4f4ba

File tree

6 files changed

+19
-0
lines changed

6 files changed

+19
-0
lines changed
172 KB
Loading
34.1 KB
Loading
77.4 KB
Loading
95.4 KB
Loading
85 KB
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
@@ -36,6 +38,23 @@ You can authenticate the Apify API in two ways. You can either pass the token vi
3638
Note that some API endpoints, such as [Get list of keys](/api/v2#/reference/key-value-stores/key-collection/get-list-of-keys),
3739
do not require an authentication token because they contain a hard-to-guess identifier that effectively serves as an authentication key.
3840

41+
## Expiration
42+
43+
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.
44+
45+
![Creating token with expiration date in Apify Console](../images/api-token-expiration-date.png)
46+
47+
## Rotation
48+
49+
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.
50+
51+
![Rotate token in Apify Console](../images/api-token-rotate.png)
52+
53+
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.
54+
55+
![Leaked token in Apify Console](../images/api-token-leaked.png)
56+
57+
3958
## Organization accounts
4059

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

0 commit comments

Comments
 (0)