Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there a way to create a oauth2 discord link that will automatically add somebody to the server?

Is there a way to create a oauth2 discord link that will automatically add somebody to a server ?

Right now I’m just using normal link for authorization

https://discord.com/api/oauth2/authorize?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

To add a user to a server automatically, you’ll need to use a bot that has already been added to the server and has the necessary permissions to add members. So you would generate an OAuth2 link for the bot.

When a user clicks on the OAuth2 link and authorizes the bot to join their server, you can use the bot to programmatically add the user to the desired server using the server’s ID and the guild.addMember API method

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading