Maton

Authentication

Every request to the Maton API is authenticated with an API key.

Getting API Key

  1. Sign in or create an account at Maton.
  2. Navigate to Settings.
  3. Click the copy button next to API Key.
  4. Store it as an environment variable:
export MATON_API_KEY="YOUR_API_KEY"

Using API Key

Pass your API key in the Authorization header as a bearer token with every request:

curl "https://api.maton.ai/connections" \
  -H "Authorization: Bearer $MATON_API_KEY"
const response = await fetch('https://api.maton.ai/connections', {
  headers: {
    Authorization: `Bearer ${process.env.MATON_API_KEY}`,
  },
})
import os
import requests

response = requests.get(
    "https://api.maton.ai/connections",
    headers={"Authorization": f"Bearer {os.environ['MATON_API_KEY']}"},
)

Rotating API Key

If your key is exposed, rotate it immediately in Settings. The previous key stops working once rotated.

Security

  • Treat your API key as a secret. Never log it, echo it, commit it, or expose it in client-side code.
  • Store the key in an environment variable or a secrets manager - never hardcode them in source code.
  • For browser-based applications, use a backend proxy to avoid exposing keys to the client.

Never expose your API key in client-side code. Use a server-side proxy to make authenticated requests on behalf of your frontend.

On this page