Servers API
On this page
We suggest the following regex to extract Discord invites with:
/(https?:\/\/)?(.*?@)?(www\.)?(discord\.(gg)|discord(app)?\.com\/invite)\/(?<code>[\w-]+)/ui
How to make a request
This endpoint only accepts GET
requests.
To check a server, send a GET
request to https://api.phish.gg/server
with either a request query of ?id=SERVERID
.
Alternatively, you can get a response with all of the known servers by sending a GET request to https://api.phish.gg/servers/all
. By default the response is JSON, but you can change to plain text with ?format=text
.
Response
If the server is known in our database, you will recieve the following response:
{
"match":true,
"reason":"reason"
}
However, if it doesn’t, you’ll recieve the following response:
{
"match":false
}