Exchange authorization code for access token

Changed on

Exchanges an authorization code for an access token

post/authorizations/exchange

Request

  • Base URL
    https://api.jsr.io
  • Auth
    HTTP bearer

Request body

exchangeTokenstring required

The token that can be used to exchange for a device token after the authorization has been approved.

verifierstring required

The verifier that was used to generate the challenge.

Response

OK

tokenstring required

The device token that can be used to authenticate requests.

Example response

{
  "user": {
    "name": "Ryan Dahl",
    "avatarUrl": "https://avatars.githubusercontent.com/u/80?v=4",
    "githubId": 80
  }
}

Changes

    • breaking

      the response property ///// became nullable for the status

    • warning

      removed the optional property ///// from the response with the status

    • warning

      removed the optional property ///// from the response with the status

    • warning

      removed the optional property ///// from the response with the status

    • warning

      removed the optional property ///// from the response with the status

    • warning

      removed the optional property ///// from the response with the status

    • warning

      removed the optional property ///// from the response with the status