Skip to contents

Authentication

How to authenticate your API requests with Statsnet.

View as Markdown

Statsnet verifies the authenticity of your API requests using your account’s unique API key. If you don’t include your key in an API request or use an incorrect or expired key, Statsnet will return an error.

You can access your API key by logging into your Statsnet account and visiting Developer Settings.

If you don’t have a Statsnet account, you can sign up in just a few minutes. Once you purchase a “Premium” plan or higher, you’ll be able to view your API key.

Code Examples

API request example

Error Handling

If the authorization header is missing or malformed, the API returns an HTTP response with status code 403 Forbidden and a JSON-encoded error:

Error response