Developer API

One API for your bot, site or tool.

Read profiles, post comments, pull stats, upload files, manage templates and receive signed webhooks. Scoped keys keep every integration to exactly what it needs.

Base URLhttps://resent.lol/api/v1AuthAuthorization: Bearer rl_live_…FormatJSON · UTF-8Updated23 November 2026

Quick start

API access is granted by the owner. Once it is on, open Dashboard → Developers, create a key, and send it as a bearer token. Keys are shown once; store yours in an environment variable.

bash
curl https://resent.lol/api/v1/me \
  -H "Authorization: Bearer $RESENT_API_KEY"

The response is your profile plus the key's scopes, rate limit and today's usage.

json
{
  "id": 42,
  "username": "yourname",
  "display": "Your Name",
  "url": "https://resent.lol/yourname",
  "api": {
    "key": { "hint": "rl_live_ab12…wxyz", "scopes": ["profile:read", "stats:read"] },
    "usage": { "day": "2026-11-23", "requests": 12, "errors": 0 }
  }
}

Getting access

Owner-approved by design.

The owner grants API access per member and chooses the allowed scopes and key slots. Revoking access immediately invalidates every key that member holds. There is no self-serve signup for the API.

1. Ask the owner

Send your username and what you want to build. The owner opens the API tab in the owner panel.

2. Get scopes

The owner picks a scope set and a key slot count (3 by default, up to 20).

3. Mint a key

Open Dashboard → Developers and create a key. It is shown once, then only its hash and hint are kept.

4. Build

Use the REST API, an SDK or webhooks. Rotate or revoke keys from the same page.

Authentication

Every request after the public metadata routes needs a key. Two headers work:

http
Authorization: Bearer rl_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X-API-Key: rl_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Keys start with rl_live_. Only a peppered hash is stored, so a lost key cannot be recovered — rotate it instead. Never put a key in client-side JavaScript, a public repo or a Discord message.

StatusCodeMeaning
401missing_keyNo bearer token or X-API-Key.
401invalid_keyThe key is unknown, revoked or expired.
403access_revokedThe owner turned API access off for the account.
403scope_requiredThe key does not include the scope for that route.
429rate_limitedPer-minute limit reached. Read Retry-After.
429quota_exhaustedDaily request quota reached.

Scopes

A key can only use scopes the owner allowed. Write scopes imply the matching read scope. Owner scopes (admin:*) can never be granted to a member key.

profile:readRead profilesYour account and any public profile.
profile:writeEdit your profileDisplay name, bio, links, media and settings.
social:readRead commentsComments and reaction counts.
social:writePost comments and reactionsComment, react and delete your own comments.
stats:readRead statsViews, rank, sources, clicks and audience data.
leaderboard:readRead the leaderboardRankings by views, likes, aliases, badges and season.
search:readSearch membersFind members by username, display name, bio or alias.
site:readRead site numbersAggregate member, view and link counts.
uploads:readList uploadsYour files, sizes, limits and storage use.
uploads:writeUpload and delete filesSend file bytes and remove your own uploads.
templates:readRead templatesYour templates and the public gallery.
templates:writeManage templatesCreate, delete and apply templates.
widgets:readRead widgetsLive data for a profile's widgets.
webhooks:readRead webhooksList endpoints and delivery history.
webhooks:writeManage webhooksCreate, edit, test and delete endpoints.
admin:readOwner: read administrationOwner-only overview and request logs.
admin:writeOwner: manage accessOwner-only grants, revokes and key rotation.

Endpoints

All paths below are relative to https://resent.lol/api/v1.

MethodPathScopeWhat it does
GET/meprofile:readYour account, API key and usage summary.
PATCH/me/profileprofile:writeUpdate display, bio, links, media and profile settings.
GET/me/analyticsstats:readDaily views, sources, clicks, rank and audience.
GET/users/:usernameprofile:readPublic profile, links, badges, widgets and social counts.
GET/users/:username/statsstats:readViews, weekly views, rank, likes and comments.
GET/users/:username/badgesprofile:readBadges earned by a member.
GET/users/:username/commentssocial:readComments with cursor pagination.
POST/users/:username/commentssocial:writeComment on a profile (500 characters max).
DELETE/comments/:idsocial:writeDelete your comment or one on your profile.
POST/users/:username/likesocial:writeReact with 1, -1 or 0 to clear.
GET/leaderboardleaderboard:readRanked members with paging and five sort modes.
GET/searchsearch:readSearch usernames, display names, bios and aliases.
GET/statssite:readAggregate site counts.
GET/badgesprofile:readBadge catalogue with your earned flags.
GET/uploadsuploads:readYour files, storage use and limits.
POST/uploadsuploads:writeRaw file bytes with ?kind=file|avatar|banner|…
DELETE/uploads/:iduploads:writeDelete one of your uploads.
GET/templatestemplates:readYour templates or the public gallery.
POST/templatestemplates:writeSave a template with an optional preview.
DELETE/templates/:idtemplates:writeDelete your template.
POST/templates/:id/usetemplates:writeCount a template application.
GET/widgets/:usernamewidgets:readLive widget payload without counting a view.
GET/webhookswebhooks:readList endpoints and delivery stats.
POST/webhookswebhooks:writeCreate an endpoint; the secret is shown once.
PATCH/webhooks/:idwebhooks:writeChange URL, events or active state.
DELETE/webhooks/:idwebhooks:writeDelete an endpoint and its history.
POST/webhooks/:id/secretwebhooks:writeRotate the signing secret.
POST/webhooks/:id/testwebhooks:writeQueue a signed test delivery.
GET/webhooks/:id/deliverieswebhooks:readRecent delivery attempts.

Pagination

Comments use a timestamp cursor: pass ?before=<created> from the last item. The leaderboard uses ?offset= and ?limit=. Template and upload lists use ?limit= and ?offset=. Limits are capped server-side.

Examples

TypeScript / JavaScript

ts
const API = 'https://resent.lol/api/v1';
const KEY = process.env.RESENT_API_KEY!;

async function profile(username: string) {
  const res = await fetch(`${API}/users/${encodeURIComponent(username)}`, {
    headers: { Authorization: `Bearer ${KEY}` }
  });
  if (!res.ok) throw new Error((await res.json()).error);
  return (await res.json()).profile;
}

console.log(await profile('yourname'));

discordeno

ts
import { createBot, Intents, startBot } from 'discordeno';
import { resentProfile, resentLeaderboard } from './resent-discordeno.js';

const bot = createBot({
  token: process.env.DISCORD_TOKEN!,
  intents: Intents.Guilds | Intents.GuildMessages,
  events: {
    ready: () => console.log('ready'),
    messageCreate: async (_bot, message) => {
      const text = message.content.trim();
      if (text === '!profile') {
        const p = await resentProfile('yourname');
        await bot.helpers.sendMessage(message.channelId, {
          content: `**${p.display}** · ${p.views} views · ${p.social.up} likes\n${p.url}`
        });
      }
      if (text === '!top') {
        const top = await resentLeaderboard(5);
        await bot.helpers.sendMessage(message.channelId, {
          content: top.entries.map(e => `#${e.rank} ${e.username} — ${e.metric}`).join('\n')
        });
      }
    }
  }
});

await startBot(bot);

discord.py

python
import os
import discord
from discord.ext import commands
from resent import ResentClient

bot = commands.Bot(command_prefix="!", intents=discord.Intents.default())
resent = ResentClient(os.environ["RESENT_API_KEY"])

@bot.command()
async def profile(ctx: commands.Context, username: str):
    p = await resent.profile(username)
    await ctx.reply(f"**{p['display']}** · {p['views']} views · {p['social']['up']} likes\n{p['url']}")

@bot.command()
async def top(ctx: commands.Context, limit: int = 5):
    board = await resent.leaderboard(limit=limit)
    lines = [f"#{e['rank']} {e['username']} — {e['metric']}" for e in board["entries"]]
    await ctx.reply("\n".join(lines) or "No members yet.")

bot.run(os.environ["DISCORD_TOKEN"])

discord.js

js
import { Client, GatewayIntentBits, Events } from 'discord.js';

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
const API = 'https://resent.lol/api/v1';
const headers = { Authorization: `Bearer ${process.env.RESENT_API_KEY}` };

client.on(Events.MessageCreate, async message => {
  if (message.author.bot || !message.content.startsWith('!profile ')) return;
  const name = message.content.slice(9).trim();
  const res = await fetch(`${API}/users/${encodeURIComponent(name)}`, { headers });
  if (!res.ok) return message.reply('No member with that username.');
  const { profile } = await res.json();
  await message.reply(`**${profile.display}** — ${profile.views} views\n${profile.url}`);
});

client.login(process.env.DISCORD_TOKEN);

Python requests

python
import os, requests

BASE = "https://resent.lol/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['RESENT_API_KEY']}"}

r = requests.get(f"{BASE}/leaderboard", params={"sort": "likes", "limit": 10}, headers=HEADERS, timeout=15)
r.raise_for_status()
for entry in r.json()["entries"]:
    print(entry["rank"], entry["username"], entry["metric"])

Uploads

Uploads take raw bytes, not multipart form data. Send the file body with its realContent-Type, set ?kind=, and optionally X-File-Name. The largest single chunk is 32 MB; larger files use the dashboard's chunked uploader.

bash
curl -X POST "https://resent.lol/api/v1/uploads?kind=avatar" \
  -H "Authorization: Bearer $RESENT_API_KEY" \
  -H "Content-Type: image/png" \
  -H "X-File-Name: me.png" \
  --data-binary @me.png

Kinds are file, avatar, banner, background,audio, badge, cursor and embed. To use a picture as your avatar, PATCH /me/profile with the returned url.

json
{ "avatar": "/i/abc123.png", "banner": null }

Webhooks

Webhooks deliver JSON to an HTTPS endpoint. Every request is signed with HMAC-SHA256 over the raw body using your endpoint secret. Verify the signature before trusting the payload, and reject anything older than five minutes.

profile.viewprofile.likeprofile.commentprofile.comment.deletedbadge.earnedapi.key.revokedwebhook.test

Headers

http
X-Resent-Event: profile.comment
X-Resent-Delivery: whd_abc123
X-Resent-Signature: sha256=hex…
Content-Type: application/json

Payload

json
{
  "id": "whd_abc123",
  "event": "profile.comment",
  "created": 1795394400000,
  "data": {
    "profile": "yourname",
    "by": "someone",
    "body": "nice page",
    "id": "comment_id"
  }
}

Verify a signature (Node)

js
import { createHmac, timingSafeEqual } from 'node:crypto';

function verify(rawBody, header, secret) {
  const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex');
  const a = Buffer.from(header || ''), b = Buffer.from(expected);
  return a.length === b.length && timingSafeEqual(a, b);
}

Failed deliveries are retried five times with exponential backoff (1m, 5m, 30m, 2h, 6h). The dashboard shows the response code and error for each attempt. Only HTTPS URLs are accepted; private, loopback and link-local addresses are blocked.

Limits & errors

Every key has a per-minute limit and a daily quota. Both are set when the key is created and can be lowered later. Responses carry the current state:

http
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1795394460
X-Quota-Limit: 5000
X-Quota-Remaining: 4988

Errors are JSON with a stable code so a bot can react without parsing prose:

json
{ "error": "This key needs the stats:read scope", "code": "scope_required", "scope": "stats:read" }
StatusWhen
400Malformed JSON, missing field, invalid reaction or template.
401Missing, invalid, revoked or expired key.
403Access revoked, missing scope, or owner-only route.
404No member, comment, upload or template with that id.
409Key slot, template or webhook limit reached.
413File larger than the kind's cap or the 32 MB chunk limit.
429Rate limit or daily quota. Honour Retry-After.
500Unexpected server error. Retry with backoff.

SDKs & snippets

Copy a file into your project. They have no dependencies beyond the standard library of each language.

The snippets are examples, not a hosted package. Pin a copy in your repo so an update cannot break your bot.

FAQ

Can I get a key without asking the owner?

No. Access is granted per member in the owner panel. Ask the owner with your username and a short description of your project.

What happens when access is revoked?

Every active key for that member is revoked at once. Requests return 401 invalid_key, and the member sees the gate again in Dashboard → Developers.

Can I use the API from a browser?

Yes, CORS is open for /api/v1. But a key in client-side code is public. Use a small server or serverless function to hold the key.

Do API reads count as profile views?

No. Reading a profile through the API never increments the view counter. Widget reads are separate for the same reason.

How do I rotate a key?

Use Rotate in Dashboard → Developers, or POST /api/me/developer/keys/:id/rotate. The old key is revoked immediately and the new one is shown once.

Are webhooks retried?

Yes, five attempts with exponential backoff. A 2xx response marks the delivery delivered; anything else is retried.

Where do I report a bug?

Open the Help Center or message the owner in Discord. Include the request id, endpoint and response code; never paste a full key.

resent.lol developer API · v1 · 23 November 2026Help Center · Privacy · Terms