Merge pull request #748 from fsufitch/master
Add clarifying docs for using an OAuth2 token
This commit is contained in:
commit
9499577a76
1 changed files with 4 additions and 1 deletions
|
@ -31,10 +31,13 @@ var ErrMFA = errors.New("account has 2FA enabled")
|
||||||
// tasks if given enough information to do so. Currently you can pass zero
|
// tasks if given enough information to do so. Currently you can pass zero
|
||||||
// arguments and it will return an empty Discord session.
|
// arguments and it will return an empty Discord session.
|
||||||
// There are 3 ways to call New:
|
// There are 3 ways to call New:
|
||||||
// With a single auth token - All requests will use the token blindly,
|
// With a single auth token - All requests will use the token blindly
|
||||||
|
// (just tossing it into the HTTP Authorization header);
|
||||||
// no verification of the token will be done and requests may fail.
|
// no verification of the token will be done and requests may fail.
|
||||||
// IF THE TOKEN IS FOR A BOT, IT MUST BE PREFIXED WITH `BOT `
|
// IF THE TOKEN IS FOR A BOT, IT MUST BE PREFIXED WITH `BOT `
|
||||||
// eg: `"Bot <token>"`
|
// eg: `"Bot <token>"`
|
||||||
|
// IF IT IS AN OAUTH2 ACCESS TOKEN, IT MUST BE PREFIXED WITH `Bearer `
|
||||||
|
// eg: `"Bearer <token>"`
|
||||||
// With an email and password - Discord will sign in with the provided
|
// With an email and password - Discord will sign in with the provided
|
||||||
// credentials.
|
// credentials.
|
||||||
// With an email, password and auth token - Discord will verify the auth
|
// With an email, password and auth token - Discord will verify the auth
|
||||||
|
|
Loading…
Reference in a new issue