npm.io
3.0.4 • Published 9 months ago

discord-oauth2-utils

Licence
MIT license
Version
3.0.4
Deps
1
Size
13 kB
Vulns
0
Weekly
0
Stars
6

npm:
https://www.npmjs.com/package/discord-oauth2-utils

const client = new OAuth({
  clientId,
  clientSecret,
  redirectUri,
  scopes: ["identify"],
});
const auth = client.authorizationLink();

const {access_token} = await client.requestToken(code);
const user_raw = await client.fetchUser(access_token);
const guilds_raw = await client.fetchGuilds(access_token);

Keywords