API Authentication

All SnapTimers API requests require authentication using an API key. This guide explains how to create and use API keys.

Requirements

API access requires a Pro plan or higher. Upgrade from your Account settings to enable API access.

Creating an API Key

  1. 1.Go to Account → API
  2. 2.Click "Create API Key"
  3. 3.Give your key a descriptive name (e.g., "Production")
  4. 4.Select the scopes you need
  5. 5.Copy and securely store the key immediately

Important: The full API key is only shown once. If you lose it, you'll need to create a new one.

Key Format

SnapTimers API keys follow this format:

st_XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • st_ prefix identifies SnapTimers keys
  • • First 8 characters are a public identifier
  • • Remaining characters are the secret

Using Your API Key

Include your API key in the request headers:

Authorization Header (Recommended)

Authorization: Bearer st_your_api_key

X-API-Key Header (Alternative)

X-API-Key: st_your_api_key

Example Request

cURL
curl https://www.snaptimers.com/api/v1/timers \
  -H "Authorization: Bearer st_your_api_key" \
  -H "Content-Type: application/json"

API Key Scopes

ScopeDescription
timers:readList and get timer details
timers:writeCreate, update, delete timers
analytics:readView timer analytics
usage:readView account usage stats

Security Best Practices

  • Never commit API keys to version control
  • Use environment variables for key storage
  • Create separate keys for development and production
  • Use minimal scopes needed for each key
  • Rotate keys periodically
  • Revoke unused or compromised keys immediately