AppMarketScraper

Authentication

Learn how to authenticate your API requests

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

Getting Your API Key

  1. Sign up at appmarketscraper.com
  2. Navigate to the API Keys section in your dashboard
  3. Create a new API key
  4. Copy the key and store it securely

Making Authenticated Requests

Include your API key in the x-api-key header for all requests:

curl https://api.appmarketscraper.com/v1/scrape/shopify/apps \
  -H "x-api-key: sk_your_api_key_here"

API Key Format

API keys start with the prefix sk_ followed by a random string:

sk_abc123xyz456def789ghi012jkl345mno

Security Best Practices

  • Keep it secret: Never expose your API key in client-side code (browsers, mobile apps)
  • Use environment variables: Store keys in environment variables, not in code
  • Rotate keys regularly: Periodically regenerate your API keys
  • Monitor usage: Keep an eye on your API usage dashboard for unusual activity

Example: Environment Variables

# .env file
VITE_API_KEY=sk_your_api_key_here
// Never expose API keys in frontend code
// Instead, make requests through your backend
const response = await fetch('/api/proxy/scrape/shopify/apps', {
  headers: {
    'x-api-key': process.env.API_KEY
  }
});

Authentication Errors

If your API key is missing or invalid, you'll receive a 401 Unauthorized response:

{
  "error": "Unauthorized",
  "message": "Invalid or missing API key"
}

Troubleshooting

Q: I'm getting a 401 error

A: Make sure you're passing the x-api-key header with a valid API key. Double-check that the key hasn't been deleted or revoked.

Q: Where can I find my API key?

A: After signing up, go to /api-keys to create and manage your API keys.

Q: Can I use multiple API keys?

A: Yes, you can create multiple API keys for different applications or environments. Each key can be revoked independently.