GithubHelp home page GithubHelp logo

isabella232 / discord-oauth2-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from discord/discord-oauth2-example

0.0 0.0 0.0 6 KB

Discord OAuth2 Example

Home Page: https://discordapp.com/developers/docs/topics/oauth2

License: MIT License

Python 100.00%

discord-oauth2-example's Introduction

Create Application

Head over to our developer site to create an application, and then save the client id and client secret to use in OAuth2 libraries as client_id and client_secret.

{
  "id": "152638009253036032",
  "name": "OAuth2 Test",
  "description": "",
  "icon": null,
  "secret": "p6KNMamrU5OVWtZiFe2kSkhx3Amxm0xB",
  "redirect_uris": ["http://localhost:5000/callback"],
}

If you want to update the application then you can PUT to https://discordapp.com/api/oauth2/applications/<id> endpoint. You must include the whole object except id and secret. Icon may be set using a data-uri like the user avatar and guild icon endpoints.

Run

  • pip install -r requirements.txt
  • OAUTH2_CLIENT_ID=152638009253036032 OAUTH2_CLIENT_SECRET=p6KNMamrU5OVWtZiFe2kSkhx3Amxm0xB python app.py
  • open http://localhost:5000

Scopes

  • identify allows /users/@me without email.
  • email makes /users/@me return an email.
  • connections allows /users/@me/connections to return linked Twitch and YouTube accounts.
  • guilds allows /users/@me/guilds to return basic information about all of a user's guilds (servers).
  • guilds.join allows /guilds/<guild_id>/members/<user_id> to be used to join a guild (server).

discord-oauth2-example's People

Contributors

endendragon avatar night avatar vishnevskiy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.