API reference
Account
Identify the account behind a token and check its plan. GET /me is the quickest way to confirm that a new token works.
1 endpointBase URL https://autoranko.com/api/public/v1Every request needs a bearer token
Get the current account
https://autoranko.com/api/public/v1/meReturns the account the API token belongs to: its ID, email and name, its subscription plan and how many sites it owns. Call it first to check that a token works: a 200 means the token is valid and active.
plan is the account's billing plan (free unless a paid subscription is active, trialing or past due). Allowances are enforced per site, using each site's own plan field (see GET /sites/{id}), which normally mirrors this value.
Request
No parameters. Send the request with your token, nothing else.
curl https://autoranko.com/api/public/v1/me \
-H "Authorization: Bearer $AUTORANKO_TOKEN"const res = await fetch("https://autoranko.com/api/public/v1/me", {
headers: { Authorization: `Bearer ${process.env.AUTORANKO_TOKEN}` },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(`${data.account.email}: ${data.plan} plan, ${data.site_count} site(s)`);import os
import requests
res = requests.get(
"https://autoranko.com/api/public/v1/me",
headers={"Authorization": f"Bearer {os.environ['AUTORANKO_TOKEN']}"},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(f"{data['account']['email']}: {data['plan']} plan, {data['site_count']} site(s)")<?php
$ch = curl_init('https://autoranko.com/api/public/v1/me');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AUTORANKO_TOKEN')],
]);
$data = json_decode(curl_exec($ch), true);
if (isset($data['error'])) throw new RuntimeException($data['error']['message']);
printf("%s: %s plan, %d site(s)\n", $data['account']['email'], $data['plan'], $data['site_count']);Response
200OKThe account, its plan and its site count.
application/jsonaccountobjectThe account that owns the token.accountkeys(3)Accountidstring (uuid)Account ID (a UUID).emailstring (email)The account's login email.namestring or nullDisplay name, ornullif none is set.
planstringThe account's subscription plan:freeunless a paid subscription is active, trialing or past due.One of
freestarterprosite_countintegerNumber of sites the account owns.
Examples
GET/me
{
"account": {
"id": "7776bc52-200e-4df1-b959-0837990dd4e8",
"email": "demo@autoranko.com",
"name": "Demo Account"
},
"plan": "free",
"site_count": 1
}GET/me
{
"error": {
"code": "missing_token",
"message": "Missing bearer token. Create one in Dashboard → API."
}
}Errors
| Error | When |
|---|---|
| 401missing_token | The Authorization: Bearer … header is missing. |
| 401invalid_token | The token is malformed, unknown or revoked. |
| 429rate_limited | The token made more than 120 requests in the last 60 seconds. |
API version v1. Every path on this page is relative to https://autoranko.com/api/public/v1.