Add OAuth 2.0 token
Once you’ve obtained an OAuth 2.0 token, you can use this endpoint to add it to the current logged-in member&rsqup;s account, so that she can use it to authenticate in the future.
Request
HTTP Header | Value |
---|---|
Authorization |
A valid JSON Web Token, of the form Bearer ENCODEDHEADER.ENCODEDPAYLOAD.ENCODEDSIGNATURE
|
Request body data | Value type | Value |
---|---|---|
provider |
string |
A string indicating the OAuth 2.0 host that provided the token. Accepted values are patreon ,
discord , google , github , facebook , and
twitter . |
id |
string |
The ID field of the OAuth 2.0 token. |
token |
string |
The value of the OAuth 2.0 token. |
Examples
Response
If you’ve provided a valid JSON Web Token and the API can save the token given, it responds with a
200
HTTP status. If it did not recognize any valid authentication, it responds with a
401
HTTP status, and if it could not save the token provided, a 406
status.