Skip to main content
Authenticate your requests with your Alphacast API key.

Get your API key

Open your settings. Next to API Key, click Show Key.
Treat your API key like a password. Do not share it, commit it to version control, or put it in client-side code.

Use HTTP Basic Auth

Send the key as the username and leave the password empty.

The apiKey query parameter

Most endpoints require Basic Auth. A few endpoints also accept ?apiKey=YOUR_API_KEY, for tools that cannot send headers. The main one is Download data:
Do not expect this parameter to work on other endpoints, such as listing or creating repositories and datasets. A URL that contains your key can end up in logs, history, and shared files. Use Basic Auth whenever you can.

Authentication errors

A missing or invalid key returns 401. The body is not always JSON, so check the status code before you parse the response. Check that:
  • The request includes the key.
  • The key is the username, not the password.
  • You are using your current key. In settings, Reset creates a new key. Scripts and Excel integrations that use the old key can stop working.

Keep your key in an environment variable

If your key is exposed, reset it in your settings.