How to connect your fediverse account to Discord
These articles will telling you how to connect your fediverse account to Discord as connections to veirfy that's your account.
What do you need first
- Your Discord account logged in inside your browser
- Linux Terminal or Mac Terminal (For Windows user, use WSL2)
- Your fediverse account (Mastodon, Akkoma, etc)
Get your Discord Token
First, you need to get your Discord account token first before you can do this. Also, secure your token because it's sensitive key and cound be used for you to logged in into third party Discord client.
To know how to fetch your Discord account token, use these tutorial to get it
Open your Terminal
After getting your own Discord account token, you need to type these command below.
curl -s -H "authorization:your-token" "https://discord.com/api/v9/connections/mastodon/authorize?handle={@username@server}"
Change your-token by your actual Discord account token, and change @username@server with your actual fediverse handle (example like @jimedrand@fe.disroot.org). After that, press enter and you'll get response like these.
{"url":"your-auth-link"}
example like below (link below is expired, imagine it as example)
{"url":"https://fe.disroot.org/oauth/authorize?client_id=40Lh24Hq1C5zxd4UEuX0XDUl8cCx8uHpzLP08s4R4UI&response_type=code&redirect_uri=https%3A%2F%2Fdiscord.com%2Fapi%2Fconnections%2Fmastodon%2Fcallback&scope=read&force_login=False&state=7e8c0464cc1dc8b362016dbd715d2eba&lang=None"}
Then, you got the auth link that you need to paste it to your browser.
Authentication inside browser
Paste your auth link to new tab and then enter your fediverse account if you haven't logged in yet, or allow it if you already logged in and wait for connections, if you see it's connected then congratulations! Your fediverse account has been connected. If not, then try it again or use another browser with logged in Discord there.
Remember, these actions only applicable to every fediverse platform that you logged in on every Mastodon client. If your favourite platform cannot logged in inside every Mastodon client, then you can'u use these tutorial. Use your own another account in supported platform that can be used to logged in in every Mastodon client.
Refrences and Big thanks
https://docs.discord.food/resources/connected-accounts#connection-type
Big thanks to my friend WilloizCitron about these. It's really helpful for everyone!