Skip to content

Latest commit

 

History

History
89 lines (63 loc) · 1.62 KB

File metadata and controls

89 lines (63 loc) · 1.62 KB
title Authentication
description How to authenticate with the RxRadar API

API keys

All requests to the RxRadar API require authentication via an API key.

API keys are prefixed with rx_ and passed in the Authorization header:

Authorization: Bearer rx_YOUR_API_KEY

Get an API key

Contact us at contact@rxradar.xyz to get your API key.

Example usage

curl -X GET "https://api.rxradar.xyz/v1/stores" \
  -H "Authorization: Bearer rx_YOUR_API_KEY"
import requests

API_KEY = "rx_YOUR_API_KEY"

response = requests.get(
    "https://api.rxradar.xyz/v1/stores",
    headers={"Authorization": f"Bearer {API_KEY}"}
)
const API_KEY = "rx_YOUR_API_KEY";

const response = await fetch("https://api.rxradar.xyz/v1/stores", {
  headers: {
    "Authorization": `Bearer ${API_KEY}`
  }
});

Best practices

Never share your API keys. They grant access to your account and are billed to your name.

Environment variables

Store your keys in environment variables:

export RXRADAR_API_KEY="rx_YOUR_API_KEY"
import os
api_key = os.environ.get("RXRADAR_API_KEY")

Rate limits

Plan Requests/minute Requests/day
Starter 100 10,000
Pro 1,000 100,000
Enterprise Unlimited Unlimited
Contact us if you need higher limits.

Error codes

Code Meaning
401 Missing API key
403 Invalid API key
429 Rate limit exceeded