The Fifth World

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 Headers
HTTP Header Value
Authorization A valid JSON Web Token, of the form Bearer ENCODEDHEADER.ENCODEDPAYLOAD.ENCODEDSIGNATURE
Body Parameters
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

Example Request
< class="language-http">POST /v1/members/providers HTTP/1.1 Host: api.thefifthworld.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c provider=github id=1234567890 token=0987654321

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.

Example

Example Response
HTTP/1.1 200 OK