Authentication

Learn how to authenticate requests against the Sonoran Radio v2 API.

All current v2 API endpoints require bearer authentication.

Base URL

https://api.sonoranradio.com

Required Headers

Header
Value
Description

Authorization

Bearer YOUR_API_KEY

Authenticates the request

Accept

application/json

Recommended for all requests

Content-Type

application/json

Required for requests with a JSON body

Routing

Authenticated server-specific requests use:

/v2/servers/{communityId}/...

For SDK clients, configure Radio with your public community ID. Room-scoped helpers also use the room ID configured on client creation.

Example Request

local Sonoran = require("sonoran")

local client = Sonoran.createClient({
  product = Sonoran.productEnums.RADIO,
  communityId = "YOUR_COMMUNITY_ID",
  apiKey = "YOUR_API_KEY",
  roomId = 1
})

local response = client.radio:getConnectedUsersV2()

print(response.success)

Response Formats

Successful Requests

Successful responses return application/json.

Failed Requests

Authenticated v2 request failures return application/problem+json.

Example:

Common Authentication Errors

Status
Cause

401

Missing Authorization header

401

Authorization header is not using the Bearer scheme

401

API key is invalid

404

The requested communityId is not configured for the authenticated community

Rate Limits

All v2 endpoints are rate limited per API key, not per caller IP. Limits vary by endpoint, so check the individual endpoint page for the current enforced limit.

When a request is rate limited, the API returns 429 Too Many Requests.

These retries are intentionally limited. High-frequency integrations should still avoid bursty request patterns and should respect the published per-endpoint limits.

Last updated

Was this helpful?