Sample Bot API

Sample Bot API

The ER:LC lookups an app needs again and again, as a JSON API: postals and road routes for Liberty County, whether the ER:LC API is up, Roblox user lookups, Discord timestamps and Discord IDs, and licence plates. Everything else (codes, penal code, reports, server setup) is on samplebot.app/tools, ready to copy.

This is for developers. The API is for people building their own bots, websites or apps. If you do not write code, you do not need it: every tool here also works in your browser, for free, at samplebot.app/tools.

Three steps

1. Register an application and get an API key. Sign in with Discord; it takes a few seconds.
2. Send the key with every request, in the Authorization header.
3. Read the JSON. Every reply has ok, the data, and a ready-to-post text version where one makes sense.

curl https://api.samplebot.app/v1/route?from=218&to=401 \
  -H "Authorization: Bearer sb_your_key_here"

What you can call

GETPostal mapFind any Liberty County postal and the road it is on.GETRoute plannerTurn-by-turn directions by road between two postals, the same way AI dispatch gives them.GETIs the ER:LC API down?Checks PRC's ER:LC API right now and says whether it is answering.GETRoblox user lookupA Roblox username to its user ID and back, with display name and join date.GETDiscord timestamp makerTurns a date and time into Discord timestamps that show in everyone's own time zone.GETDiscord ID decoderWhen any Discord ID (user, server, message, channel) was created.GETPlate generatorRandom licence plates in your server's format, and a check for whether a plate fits it.

See all 7 endpoints

Limits

60 requests a minute and 10,000 a day per key, so the API stays fast for everyone. Up to 5 applications per Discord account.