Skip to main content

API Key

To use the MagicalAPI services, you'll need an API key. API keys are only available with Pro plans.

Prerequisites

  • A MagicalAPI account
  • An active Pro or Business plan subscription

Obtaining Your API Key

  1. Log in to Your Account
    Go to the MagicalAPI Dashboard and sign in to access your account.

  2. Navigate to API Info
    Once logged in, find the API Info tab in the left sidebar or click API Keys in the top navigation.

    MagicalAPI Dashboard API Keys Navigation

  3. Create an API Key
    In the API Info section:

    • Click "Create API Key"
    • Enter a title for your key (for tracking purposes)
    • Note: You can have up to 5 active API keys

    API Key Creation Interface

  4. Save Your API Key
    After creation, your API key will be displayed once. Make sure to:

    • Copy the key immediately
    • Store it securely
    • Never share it with others

    Generated API Key Display

Managing API Keys

Best Practices

  • Use different keys for development and production
  • Rotate keys periodically for security
  • Delete unused keys promptly

Security Guidelines

  1. Store Securely

    # Use environment variables
    import os
    api_key = os.environ.get('MAGICAL_API_KEY')
  2. Never Expose Keys

    • Don't commit keys to version control
    • Keep keys out of client-side code
    • Don't include keys in logs
  3. Monitor Usage

    • Track API calls per key
    • Set up usage alerts
    • Review access patterns
warning

If you suspect a key has been compromised:

  1. Delete it immediately in the dashboard
  2. Create a new key
  3. Update your applications with the new key

Next Steps

Once you have your API key:

  1. Learn how to authenticate requests
  2. Read the request guide
  3. Explore available services