twilight_model/oauth/
scope.rs

1//! Known list of available OAuth2 scopes.
2//!
3//! Refer to [Discord Docs/OAuth 2 Scopes] for a complete up-to-date list.
4//!
5//! [Discord Docs/OAuth 2 Scopes]: https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes
6
7/// Allows your app to fetch data from a user's "Now Playing/Recently Played"
8/// list.
9///
10/// Requires approval from Discord.
11pub const ACTIVITIES_READ: &str = "activities.read";
12
13/// Allows your app to update a user's activity
14///
15/// Requires approval from Discord, but is not required for the Game SDK
16/// activity manager.
17pub const ACTIVITIES_WRITE: &str = "activities.write";
18
19/// Allows your app to read build data for a user's applications.
20pub const APPLICATIONS_BUILDS_READ: &str = "applications.builds.read";
21
22/// Allows your app to upload/update builds for a user's applications.
23///
24/// Requires approval from Discord.
25pub const APPLICATIONS_BUILDS_UPLOAD: &str = "applications.builds.upload";
26
27/// Allows your app to use commands in a guild.
28pub const APPLICATIONS_COMMANDS: &str = "applications.commands";
29
30/// Allows your app to update its commands using a Bearer token.
31///
32/// This is a client credentials grant only.
33pub const APPLICATIONS_COMMANDS_UPDATE: &str = "applications.commands.update";
34
35/// Allows your app to update permissions for its commands in a guild a user has
36/// permissions to.
37pub const APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE: &str =
38    "applications.commands.permissions.update";
39
40/// Allows your app to read entitlements for a user's applications
41pub const APPLICATIONS_ENTITLEMENTS: &str = "applications.entitlements";
42
43/// Allows your app to read and update store data (SKUs, store listings,
44/// achievements, etc.) for a user's applications.
45pub const APPLICATIONS_STORE_UPDATE: &str = "applications.store.update";
46
47/// For oauth2 bots, this puts the bot in the user's selected guild by default
48pub const BOT: &str = "bot";
49
50/// Allows /users/@me/connections to return linked third-party accounts
51pub const CONNECTIONS: &str = "connections";
52
53/// Allows your app to see information about the user's DMs and group DMs
54///
55/// Requires approval from Discord.
56pub const DM_CHANNELS_READ: &str = "dm_channels.read";
57
58/// Enables `GET /users/@me` returning an email.
59pub const EMAIL: &str = "email";
60
61/// Allows your app to join users to a group DM.
62pub const GDM_JOIN: &str = "gdm.join";
63
64/// Allows `GET /users/@me/guilds` to return basic information about all of a
65/// user's guilds.
66pub const GUILDS: &str = "guilds";
67
68/// Allows `GET /guilds/{guild.id}/members/{user.id}` to be used for joining
69/// users to a guild.
70pub const GUILDS_JOIN: &str = "guilds.join";
71
72/// Allows `GET /users/@me/guilds/{guild.id}/member` to return a user's member
73/// information in a guild.
74pub const GUILDS_MEMBERS_READ: &str = "guilds.members.read";
75
76/// Allows `GET /users/@me`, but without the user's email.
77pub const IDENTIFY: &str = "identify";
78
79/// For local RPC server API access, this allows you to read messages from all
80/// client channels (otherwise restricted to channels/guilds your app creates).
81pub const MESSAGES_READ: &str = "messages.read";
82
83/// Allows your app to know a user's friends and implicit relationships.
84///
85/// Requires approval from Discord.
86pub const RELATIONSHIPS_READ: &str = "relationships.read";
87
88/// Allows your app to update a user's connection and metadata for the app.
89pub const ROLE_CONNECTIONS_WRITE: &str = "role_connections.write";
90
91/// For local RPC server access, this allows you to control a user's local
92/// Discord client.
93///
94/// Requires approval from Discord.
95pub const RPC: &str = "rpc";
96
97/// For local rpc server access, this allows you to update a user's activity
98///
99/// Requires approval from Discord.
100pub const RPC_ACTIVITIES_WRITE: &str = "rpc.activities.write";
101
102/// For local RPC server access, this allows you to receive notifications pushed
103/// out to the user.
104///
105/// Requires approval from Discord.
106pub const RPC_NOTIFICATIONS_READ: &str = "rpc.notifications.read";
107
108/// For local RPC server access, this allows you to read a user's voice settings
109/// and listen for voice events.
110///
111/// Requires approval from Discord.
112pub const RPC_VOICE_READ: &str = "rpc.voice.read";
113
114/// For local RPC server access, this allows you to update a user's voice
115/// settings.
116///
117/// Requires approval from Discord.
118pub const RPC_VOICE_WRITE: &str = "rpc.voice.write";
119
120/// Allows your app to connect to voice on the user's behalf and see all the
121/// voice members.
122///
123/// Requires approval from Discord.
124pub const VOICE: &str = "voice";
125
126/// This generates a webhook that is returned in the oauth token response for
127/// authorization code grants.
128pub const WEBHOOK_INCOMING: &str = "webhook.incoming";