Authentication
Customer integrations use a two-step credential model. Keep your long-lived rf_live_ API key on your server, exchange it at POST /v1/tokens for a short-lived HS256 JWT, and pass that JWT as a Bearer token to the DNS endpoints.
API keys
API key secrets start with rf_live_ and are shown once at creation. Store the secret securely on your backend and never send the raw API key directly to the DNS endpoints.
Each API key carries one or more customer scopes:
| Scope | Grants access to |
|---|---|
lookup |
/v1/lookup |
reverse |
/v1/reverse |
identity |
/v1/identity |
transfer |
/v1/transfer |
These are the customer scopes. internal is never minted from an API key.
Exchange an API key for a token
Send your API key in the Authorization header to POST /v1/tokens:
curl -sS -X POST https://resolvefrom.com/v1/tokens \
-H "Authorization: Bearer rf_live_your_secret_here"
Success response (200 OK)
Successful responses include Cache-Control: no-store:
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
{
"token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImN1cnJlbnQifQ...",
"token_type": "Bearer",
"expires_in": 600
}
| Field | Type | Description |
|---|---|---|
token |
string | Short-lived HS256 JWT to send to DNS endpoints |
token_type |
string | Always Bearer |
expires_in |
integer | Token lifetime in seconds (600, or 10 minutes) |
There is no separate refresh token. Cache the minted JWT until shortly before expires_in elapses, then repeat POST /v1/tokens.
Minted JWT claims
The returned JWT is signed with HS256 and carries the following customer-relevant claims:
| Claim | Type | Description |
|---|---|---|
team_id |
string | UUID of the team that owns the API key |
scopes |
string[] | Subset of lookup, reverse, identity, transfer |
rate_limit |
object | { "per_second": 20, "burst": 40 } (or your team's configured limits) |
metered |
boolean | Always true for customer tokens |
exp |
integer | Unix timestamp when the token expires (iat + 600) |
Failure responses
Failures on POST /v1/tokens return a JSON object containing a message field:
| HTTP Status | Message | Meaning |
|---|---|---|
401 |
Invalid API key. |
Missing Authorization header, wrong prefix, or unknown secret |
403 |
This API key has been revoked. |
The API key has been revoked and can no longer mint tokens |
402 |
This team is suspended. |
The team is currently suspended |
402 |
Insufficient credits. |
The team's credit balance is zero |
Example 402 response:
{
"message": "Insufficient credits."
}
Call DNS endpoints with the token
Include the minted JWT in the Authorization header on every DNS request:
curl -sS "https://api.resolvefrom.com/v1/lookup?name=example.com&types=A" \
-H "Authorization: Bearer $TOKEN"
When a DNS endpoint rejects authentication or authorization, it returns an application/problem+json response:
401 missing_token—Authorization: Bearer ...header was not sent401 token_expired— tokenexphas passed; mint a fresh token401 invalid_token— invalid signature, malformed JWT, or rawrf_live_key sent directly403 insufficient_scope— token lacks the scope required for that route403 team_stopped— team has been suspended