Send a dm to user after bot/app has been added/authorized? (user install)
I would like the process of adding my bot to go something like this:
This link redirects correctly, with a code that looks like this "Mz9AVQsPphK3uqdTZcxUL2kJaEDH46", I am not quite sure what to do with it, but either way, when response_type is "code", the app actually doesn't get authorized.
However if the response type is "token", redirection works, and the app does actually get authorized, but from my understanding it is limited to 7 days. In my case this might be alright though.
So now after redirecting, I can get the access_token, and in theory, if I also add the
- Lets say I send the bot authorization link to one of my friends, to showcase it (https://discord.com/oauth2/authorize?client_id=xxxxxx)
- They click on the link and authorize it, and upon getting back to Discord they will receive a DM like:
- And then they can execute those commands as they wish.
This link redirects correctly, with a code that looks like this "Mz9AVQsPphK3uqdTZcxUL2kJaEDH46", I am not quite sure what to do with it, but either way, when response_type is "code", the app actually doesn't get authorized.
However if the response type is "token", redirection works, and the app does actually get authorized, but from my understanding it is limited to 7 days. In my case this might be alright though.
So now after redirecting, I can get the access_token, and in theory, if I also add the
identify scope, I should be able to get user information with the Discord API. However this returns message 401. Having the identify scope alone works fine, however together with applications.commands. Doesn't work.