

To access a user's info, you need what's called an Access Token.

To initialise an OAuth2 Client, simply follow the example below: from discord_web.oauth2 import Oauth2Client client = Oauth2Client ( client_id, "client_secret", "redirect_uri", ) Generating an Access Token Once you do that, click on the OAuth2 tab and follow the example below:
DISCORD WEB INSTALL
Here we list both ways of installing the library (the stable version and the development version) pip install discord.webįirst of all, you need to create an application on the Discord Developer Portal.

Installing the discord.web library is a breeze. If you wish, you can install the speedups package for aiohttp, which allows aiohttp to run requests much faster. Keep in mind that all of these (with the exception of aiohttp) are installed when installing discord.web Here's a list of prerequisites that you will need for the discord-web library to work. Here, we explain how you can get started with the discord-web library. We handle the requests for you, returning easy to manage Python Objects such as the Oauth2Member object and the Oauth2Guild. Creating these requests yourself can be time-consuming! Here's where Discord-Web comes into play. Well, a good example would be a Login backend on your bot's website to allow for some advanced dashboard creation. If you're new the realm of developing for discord, you may not know what the Oauth2 api may be used for. An asynchronous wrapper for the Discord Oauth2 APIĭiscord-Web is an easy way to interface with the Discord Oauth api.
