Discord
A /rate slash command for your Discord server, served from a signature-verified interactions endpoint (Ed25519).
Examples
/rate from:USD to:EUR/rate from:USD to:EUR amount:100Setup
- 1
Create an application
At discord.com/developers/applications, create a New Application. On General Information, copy the Public Key and Application ID.
- 2
Set the public key
On the Rate-API server, add the public key to .env and re-cache config (do this before saving the endpoint URL, or Discord’s verification ping will fail).
DISCORD_PUBLIC_KEY=your_application_public_key_here php artisan config:cache - 3
Set the interactions endpoint
Back in the Discord portal, set Interactions Endpoint URL to the address below and save — it should verify with a ✓.
https://new.rate-api.com/integrations/discord - 4
Register the /rate command
Run this once with your App ID and Bot token. Global commands can take up to an hour to appear.
DISCORD_APP_ID=... DISCORD_BOT_TOKEN=... node register-commands.mjs - 5
Add it to your server
Use OAuth2 → URL Generator with the applications.commands scope to invite the app.
Endpoint
POST https://new.rate-api.com/integrations/discordVerified by the platform’s request signature. It safely returns “not configured” until its secret is set on the server.