Create authorization

Changed on

Starts an authorization flow

post/authorizations

Request

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

Request body

challengestring required

The challenge that will later be needed to retrieve the token after authorization.

Example request

{
  "challenge": "1234567890abcdef",
  "permissions": [
    {
      "scope": "denoland"
    }
  ]
}

Response

OK

verificationUrlstring required

The URL that the user should visit to approve the authorization.

codestring required

The authorization code that the user can manually enter if they can not directly visit the link.

exchangeTokenstring required

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

pollIntervalinteger required

The number of seconds that should be waited between polling the status of the authorization.

expiresAtstring date-time required

The date and time until which the authorization can be approved / exchanged.

Changes

    • breaking

      removed subschema #1 subschema #2 subschema #3 from the / request property oneOf list

    • info

      added subschema #1 subschema #2 subschema #3 to the / request property oneOf list

    • info

      the response property became required for the status

    • info

      added subschema #1 subschema #2 to the / request property oneOf list