Skip to content

Commit

Permalink
Fix incorrectly placed block (discord#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remco authored and b1naryth1ef committed Apr 10, 2016
1 parent 43f21eb commit 416923e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/topics/OAUTH2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ Bots within the Discord API are a separate type of users that are owned by appli

The first step in implementing OAuth2 is [registering a developer application](#MY_APPLICATIONS/top), and retrieving your client ID and client secret. Most people who will be implementing OAuth2 will want to find and utilize a library in the language of their choice. For those implementing OAuth2 from scratch, please see [RFC 6749](https://tools.ietf.org/html/rfc6749) for details. In the Discord OAuth2 API, it's technically valid to _not_ have a redirect URI for your application, this enables one-sided authentication flows which allow for server-less bot-adding. The URLs for OAuth2 are as follows:

###### OAuth2 Application URLs

| URL | Description |
|-----|-------------|
| https://discordapp.com/api/oauth2/authorize | Base authorization URL |
| https://discordapp.com/api/oauth2/token | Token URL |

>info
> Discord also implements refresh tokens, which can be passed to the token URL for valid authentication tokens.
### Converting User Accounts

We've provided functionality for users looking to migrate previous (unofficial) user accounts to fully-fledged bot accounts. Users have until May 1st, 2016 to convert previous accounts, after which the migration endpoint will be removed, and public bots using normal user accounts will be deactivated. The migration endpoint should only be used by users with a good understand of the command line, and the current Discord API landscape. Other users should create a new bot account instead. Once migrated, there is **no way to rollback to a normal account** (don't be a Bastian). Therefore, this process should **not** be used by normal users looking to continue accessing their accounts from the desktop/web apps.
Expand All @@ -36,16 +46,6 @@ curl -H 'Authorization: YOUR TOKEN' \
https://discordapp.com/api/oauth2/applications/APPLICATION_ID/bot
```

###### OAuth2 Application URLs

| URL | Description |
|-----|-------------|
| https://discordapp.com/api/oauth2/authorize | Base authorization URL |
| https://discordapp.com/api/oauth2/token | Token URL |

>info
> Discord also implements refresh tokens, which can be passed to the token URL for valid authentication tokens.
### Scopes

Scopes provide access to certain resources of a users account. Your API client or service should only request scopes it requires for operation.
Expand Down Expand Up @@ -77,4 +77,4 @@ A URL can be generated that redirects authenticated users to the add-bot flow, b
https://discordapp.com/oauth2/authorize?&client_id=157730590492196864&scope=bot&permissions=0
```

Where `client_id` is your _bot_ applications ID, and permissions is an integer following the [permissions](#DOCS_PERMISSIONS/bitwise-permission-flags) format.
Where `client_id` is your _bot_ applications ID, and permissions is an integer following the [permissions](#DOCS_PERMISSIONS/bitwise-permission-flags) format.

0 comments on commit 416923e

Please sign in to comment.