Skip to main content

  discord-ext-oauth

An asynchronous OAuth2 extension for discord.py.
Read the documentation online.


Installing the extension

Installing the stable version:

pip install discord-ext-oauth

Installing the development version:

pip install git+https://github/moanie/discord-ext-oauth

Example Usage

import asyncio
from discord.ext import oauth

client = oauth.OAuth2Client(
    client_id = 000000000000000000,
    client_secret = "CLIENT_SECRET",
    redirect_uri = "https://www.google.com/",
    scopes = ["identify",  "guilds", "email", "connections"]
)


async def main():
    resp = await client.exchange_code("access_token_here")
    user = await client.fetch_user(resp)
    print(f"User ID: {user.id}")
    print(f"User Avatar URL: {user.avatar_url}")
    await client.close()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Output

User ID: 691406006277898302
User Avatar URL: https://cdn.discordapp.com/avatars/691406006277898302/5c8f69a903a8c5e34f93fe6ece5348c7.png 

Metadata

Release files for discord-ext-oauth 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discord-ext-oauth 0.1.0
File Size Uploaded Provenance Actions
discord-ext-oauth-0.1.0.tar.gz 7.0 kB Without provenance Details for discord-ext-oauth-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for discord-ext-oauth 0.1.0
File Interpreter ABI Platform Actions
discord_ext_oauth-0.1.0-py3-none-any.whl Python 3 none any Details for discord_ext_oauth-0.1.0-py3-none-any.whl

Total release size: 14.9 kB

Release files / discord-ext-oauth-0.1.0.tar.gz

Download URL discord-ext-oauth-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9250be7fafbd82be3f3f9381f85c50a62a2c69d2484b243cafffaf1e71b29bd0
BLAKE2b-256 checksum
How to use checksums
56d96df91fa5a39bcce26d65606848df4864db749e7484bcbc4cae430c50d3a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / discord_ext_oauth-0.1.0-py3-none-any.whl

Download URL discord_ext_oauth-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b805c122bbdc3bdad3768976f054a6088b7e58b43acfca2fcbbdc8d8d6425469
BLAKE2b-256 checksum
How to use checksums
e2997ac1395a44b0295e42904c4a339ee0bdc277f2d572f7bb25899465662c2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Security for discord-ext-oauth 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page