Discord Resolve Invite
discord.server.resolve_invite
Resolve a Discord invite URL or code into its public server preview: name, description, features, booster tier, and member and online counts.
At a glance
- Endpoint ID
discord.server.resolve_invite- Price
- 1 credit per call; failed calls are free
- Runs for up to
- 30 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "discord.server.resolve_invite", "input": { "invite": "discord-developers" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "discord.server.resolve_invite", "input": { "invite": "discord-developers" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "discord.server.resolve_invite", "input": { "invite": "discord-developers" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
invite |
string | yes | A Discord invite URL (https://discord.gg/x or https://discord.com/invite/x) or a bare invite code. | discord-developers |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "approximate_member_count": 307686, "approximate_online_count": 70164, "invite_code": "discord-developers", "invite_url": "https://discord.gg/discord-developers", "type": 0, "channel": { "name": "rules", "id": "613430047285706767", "type": 0 }, "server": { "name": "Discord Developers", "created_at": "2019-08-20T17:34:31.544Z", "banner_url": "https://cdn.discordapp.com/banners/613425648685547541/f02442ea4d3d218bbeb15ce12cff0387.png", "description": "Welcome to Discord Developers (DDevs), the official home for the community of developers building apps, bots, games, and more with Discord …", "icon_url": "https://cdn.discordapp.com/icons/613425648685547541/a_1d18823294be0ccfbcdec090c8ffcc0d.gif", "id": "613425648685547541", "nsfw": false, "nsfw_level": 0, "premium_subscription_count": 56, "premium_tier": 3, "splash_url": "https://cdn.discordapp.com/splashes/613425648685547541/56394bca8b4f60282ea833e8703b5fcf.png", "vanity_url_code": "discord-developers", "verification_level": 3, "features": [ "COMMUNITY", "VERIFIED" ] }}
Fields
| Field | Type | Example |
|---|---|---|
approximate_member_count |
integer | 307,686 |
approximate_online_count |
integer | 70,164 |
channel |
object | 3 fields |
channel.id |
string | 613430047285706767 |
channel.name |
string | rules |
channel.type |
integer | 0 |
invite_code |
string | discord-developers |
invite_url |
string | https://discord.gg/discord-developers |
server |
object | 14 fields |
server.banner_url |
string | https://cdn.discordapp.com/banners/613425648685547541/f02442ea4… |
server.created_at |
string | 2019-08-20T17:34:31.544Z |
server.description |
string | Welcome to Discord Developers (DDevs), the official home for th… |
server.features |
array | COMMUNITY, VERIFIED, DISCOVERABLE |
server.icon_url |
string | https://cdn.discordapp.com/icons/613425648685547541/a_1d1882329… |
server.id |
string | 613425648685547541 |
server.name |
string | Discord Developers |
server.nsfw |
boolean | false |
server.nsfw_level |
integer | 0 |
server.premium_subscription_count |
integer | 56 |
server.premium_tier |
integer | 3 |
server.splash_url |
string | https://cdn.discordapp.com/splashes/613425648685547541/56394bca… |
server.vanity_url_code |
string | discord-developers |
server.verification_level |
integer | 3 |
type |
integer | 0 |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Discord endpoints
Something missing or unclear? Ask the team that builds the Discord endpoints.