Skip to main content

API Authentication & Interactive Docs

Getting Your API Key

All SkyWatch API requests require authentication using an API key passed in the x-api-key header.

Obtaining an API Key

  1. Log in to your SkyWatch Hub account
  2. Navigate to your account settings
  3. Copy your API key
  4. Keep this key secure - it provides access to your account and billing
Important

Never commit your API key to version control or share it publicly. Treat it like a password.

Using the Interactive API Documentation

This documentation site includes interactive API reference pages that let you test endpoints directly from your browser.

Setting Up Authorization

  1. Navigate to any API endpoint in the REST API Reference section
  2. Click the "Authorize" button
  3. Enter your API key in the Api key field in the section on the right
  4. Congifure your payload and click "Send API Request"
  5. View the response below the button

Your API key will be saved in your browser's local storage and automatically included in all requests.

Troubleshooting Interactive Features

If you encounter issues:

  1. Check Browser Console (F12 → Console tab):

    • Look for errors or network issues
  2. Verify Authorization:

    • Ensure you've entered your API key
    • Check that your API key is valid and active
  3. Clear Browser Cache:

    • Hard refresh: Cmd+Shift+R (Mac) or Ctrl+Shift+F5 (Windows)
    • Clear localStorage: Console → localStorage.clear()
  4. Use Command Line Tools:

    • If interactive features aren't working, use curl or other API clients (examples below)

Manual Authentication

If you prefer to use API keys programmatically, include the x-api-key header in all requests:

curl https://api.skywatch.co/earthcache/accounts/users/me \
-H "x-api-key: YOUR_API_KEY_HERE"

Testing Your Authentication

The quickest way to verify your API key works:

  1. Go to List Orders in the REST API Reference
  2. Enter your API key in the example section
  3. Click "Send API Request"
  4. You should see a 200 response with your orders

If you receive a 401 or 403 error, check that:

  • Your API key is correct (no extra spaces)
  • Your account is active
  • You have the necessary permissions for the endpoint

Next Steps