OAuth authorization code flow token for Discord bot

You need a “server” to do the final step for key exchange.
And you may need to periodically get a new key.

Sure but first you need to build the website that does the authentication loop.