| name | apify-security-basics |
| description | Secure Apify API tokens, configure proxy access, and protect Actor data.
Use when hardening API key management, setting up environment-specific tokens,
or auditing Apify security configuration.
Trigger: "apify security", "apify secrets", "secure apify token",
"apify API key security", "rotate apify token".
|
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","scraping","automation","apify"] |
| compatible-with | claude-code |
Apify Security Basics
Overview
Security best practices for Apify API tokens, Actor data, proxy credentials, and webhook verification. Apify uses personal API tokens (prefixed apify_api_) for all authentication.
Prerequisites
- Apify account with Console access
- Understanding of environment variables
- Access to your deployment platform's secrets management
Token Architecture
Apify uses a single API token per user account for full API access. There is no scope-based permission system per token, so token security is critical.
| Token Type | Format | Where to Find |
|---|
| Personal API token | apify_api_... | Console > Settings > Integrations |
| Proxy password | Alphanumeric | Console > Proxy > Connection settings |
Instructions
Step 1: Secure Token Storage
APIFY_TOKEN=apify_api_YOUR_TOKEN_HERE
.env
.env.local
.env.*.local
storage/
function requireToken(): string {
const token = process.env.APIFY_TOKEN;
if (!token) {
throw new Error(
'APIFY_TOKEN is required. Get yours at ' +
'https://console.apify.com/account/integrations'
);
}
if (!token.startsWith('apify_api_')) {
console.warn();
}
token;
}