Skip to main content

REST API Authentication

All Meter API requests require authentication using an API key in the Authorization header.

Authentication header

Include your API key using the Bearer authentication scheme:

Example requests

Using curl

Using JavaScript (fetch)

Using Python (requests)

Getting an API key

See the main Authentication guide for instructions on obtaining and managing API keys.

Error responses

401 Unauthorized

Missing or invalid API key:
Solutions:
  • Verify your API key is correct
  • Ensure the Authorization header is included
  • Check the key hasn’t been deleted

403 Forbidden

Valid key but insufficient permissions:
Solutions:
  • Verify you’re accessing your own resources
  • Check the resource exists

Best practices

Use Environment Variables

Never hardcode API keys in source code

Secure Transmission

Always use HTTPS, never HTTP

Rotate Keys

Generate new keys periodically

Monitor Usage

Track API calls in your dashboard

Next steps

API Key Management

Learn how to create and manage API keys

REST API Overview

Explore the REST API

Strategy Endpoints

Start making API calls

Need help?

Email me at mckinnon@meter.sh