Help us improve
Share bugs, ideas, or general feedback.
From apollo-pack
Installs and configures Apollo.io API authentication for Node.js/TypeScript or Python projects. Sets up HTTP clients, .env keys, client code, and verifies with health endpoint.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin apollo-packHow this skill is triggered — by the user, by Claude, or both
Slash command
/apollo-pack:apollo-install-authThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Set up Apollo.io API client and configure authentication credentials. Apollo uses the `x-api-key` HTTP header for authentication against the base URL `https://api.apollo.io/api/v1/`. There is no official SDK — all integrations use the REST API directly.
Applies Apollo.io API security best practices: secure key storage via env vars/secret managers, PII redaction for logs, access controls, rotation, and audits.
Creates p5.js generative art with seeded randomness, noise fields, and interactive parameter exploration. Use for algorithmic art, flow fields, or particle systems.
Share bugs, ideas, or general feedback.
Set up Apollo.io API client and configure authentication credentials. Apollo uses the x-api-key HTTP header for authentication against the base URL https://api.apollo.io/api/v1/. There is no official SDK — all integrations use the REST API directly.
set -euo pipefail
# Node.js
npm install axios dotenv
# Python
pip install requests python-dotenv
Apollo supports two API key types:
# Create .env file (never commit this)
echo 'APOLLO_API_KEY=your-api-key-here' >> .env
echo '.env' >> .gitignore
// src/apollo/client.ts
import axios, { AxiosInstance } from 'axios';
import dotenv from 'dotenv';
dotenv.config();
const BASE_URL = 'https://api.apollo.io/api/v1';
export function createApolloClient(apiKey?: string): AxiosInstance {
const key = apiKey ?? process.env.APOLLO_API_KEY;
if (!key) throw new Error('APOLLO_API_KEY is not set');
return axios.create({
baseURL: BASE_URL,
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'x-api-key': key,
},
timeout: 30_000,
});
}
export const apolloClient = createApolloClient();
// src/scripts/verify-auth.ts
import { apolloClient } from '../apollo/client';
async function verifyConnection() {
try {
// Use the health endpoint to test connectivity
const response = await apolloClient.get('/auth/health');
console.log('Apollo connection:', response.data.is_logged_in ? 'OK' : 'Invalid key');
} catch (error: any) {
if (error.response?.status === 401) {
console.error('Invalid API key. Generate a new one at:');
console.error(' Apollo Dashboard > Settings > Integrations > API Keys');
} else {
console.error('Connection failed:', error.message);
}
}
}
verifyConnection();
# apollo_client.py
import os
import requests
from dotenv import load_dotenv
load_dotenv()
class ApolloClient:
BASE_URL = 'https://api.apollo.io/api/v1'
def __init__(self, api_key: str | None = None):
self.api_key = api_key or os.environ.get('APOLLO_API_KEY')
if not self.api_key:
raise ValueError('APOLLO_API_KEY is not set')
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'x-api-key': self.api_key,
})
def get(self, endpoint: str, **kwargs) -> requests.Response:
return self.session.get(f'{self.BASE_URL}/{endpoint}', **kwargs)
def post(self, endpoint: str, json: dict = None, **kwargs) -> requests.Response:
return self.session.post(f'{self.BASE_URL}/{endpoint}', json=json, **kwargs)
def verify(self) -> bool:
resp = self.get('auth/health')
return resp.json().get('is_logged_in', False)
client = ApolloClient()
print('Connected:', client.verify())
x-api-key header authentication.gitignore protection/auth/health verification| Error | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid or missing API key | Verify key in Apollo Dashboard > Settings > Integrations > API Keys |
| 403 Forbidden | Endpoint requires master key | Generate a master API key (not standard) in the dashboard |
| 429 Rate Limited | Too many requests per minute | Implement backoff; see apollo-rate-limits |
| Network Error | Firewall blocking outbound HTTPS | Allow outbound to api.apollo.io on port 443 |
# Test your API key from the command line
curl -s -X GET \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "x-api-key: $APOLLO_API_KEY" \
"https://api.apollo.io/api/v1/auth/health" | python3 -m json.tool
After successful auth, proceed to apollo-hello-world for your first API call.