Skip to main content

API Keys

All API requests require authentication via API key.

Generating an API Key

  1. Log in to your dashboard
  2. Go to ProfileAPI Settings
  3. Click Generate API Key
  4. Copy and securely store your key
Your API key grants full access to your account’s API. Keep it secret and never share it publicly.

Using Your API Key

Include your API key in the Authorization header of every request:
Authorization: Bearer YOUR_API_KEY

Example with cURL

curl -X GET "https://api.alpessniper.com/v1/signals" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example with JavaScript

const response = await fetch('https://api.alpessniper.com/v1/signals', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
});

Example with Python

import requests

headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
}

response = requests.get(
    'https://api.alpessniper.com/v1/signals',
    headers=headers
)

API Key Security

Do

  • Store keys in environment variables
  • Use different keys for dev/prod
  • Rotate keys periodically
  • Monitor for unusual usage

Don't

  • Commit keys to version control
  • Share keys in public channels
  • Expose keys in client-side code
  • Use the same key everywhere

Revoking Keys

If your API key is compromised:
  1. Go to ProfileAPI Settings
  2. Click Revoke next to the compromised key
  3. Generate a new key
  4. Update your applications
Revoking a key takes effect immediately. All requests using that key will fail.

Error Responses

Invalid API Key

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Expired API Key

{
  "success": false,
  "error": {
    "code": "KEY_EXPIRED",
    "message": "Your API key has expired. Please generate a new one."
  }
}