Skip to main content

Oauth Token Exchange

POST 

/users/v1/oauth/token

Exchange an authorization_code from the /users/v1/oauth/response/{platform} endpoint for an access token and refresh token.

Request

Header Parameters

    user-agent User-Agent
    x-rh-client-addr X-Rh-Client-Addr

    Possible values: <= 32 characters

    IP Address hint

Body

required

    grant_type OAuthTokenEchangeGrantType (string)required

    Possible values: [authorization_code]

    Supported grant types for OAuth Token Exchange process

    code Code (string)required

    Possible values: non-empty

    authorization_code for the OAuth exchange.

    accepted_eula Accepted Eula (boolean)

    If true, the user has accepted the EULA.

    accepted_tos Accepted Tos (boolean)

    If true, the user has accepted the TOS.

    accepted_privacy_policy Accepted Privacy Policy (boolean)

    If true, the user has accepted the Privacy Policy.

Responses

Successful Response

Schema

    access_token Access Token (string)

    Access token for the user.

    refresh_token Refresh Token (string)

    Refresh token for the user.

    needs_eula Needs Eula (boolean)

    If true, the user must accept the EULA before a token can be generated.

    needs_tos Needs Tos (boolean)

    If true, the user must accept the TOS before a token can be generated.

    needs_privacy_policy Needs Privacy Policy (boolean)

    If true, the user must accept the Privacy Policy before a token can be generated.

    regenerated_code Regenerated Code (string)

    If present, a new code was generated and can be used after the user accepts the required agreements.

    error_message Error Message (string)

    Error message if an error occurred.

Loading...