start_device_authorization

SSOOIDC.Client.start_device_authorization(**kwargs)

Initiates device authorization by requesting a pair of verification codes from the authorization service.

See also: AWS API Documentation

Request Syntax

response = client.start_device_authorization(
    clientId='string',
    clientSecret='string',
    startUrl='string'
)
Parameters
  • clientId (string) --

    [REQUIRED]

    The unique identifier string for the client that is registered with IAM Identity Center. This value should come from the persisted result of the RegisterClient API operation.

  • clientSecret (string) --

    [REQUIRED]

    A secret string that is generated for the client. This value should come from the persisted result of the RegisterClient API operation.

  • startUrl (string) --

    [REQUIRED]

    The URL for the AWS access portal. For more information, see Using the AWS access portal in the IAM Identity Center User Guide .

Return type

dict

Returns

Response Syntax

{
    'deviceCode': 'string',
    'userCode': 'string',
    'verificationUri': 'string',
    'verificationUriComplete': 'string',
    'expiresIn': 123,
    'interval': 123
}

Response Structure

  • (dict) --

    • deviceCode (string) --

      The short-lived code that is used by the device when polling for a session token.

    • userCode (string) --

      A one-time user verification code. This is needed to authorize an in-use device.

    • verificationUri (string) --

      The URI of the verification page that takes the userCode to authorize the device.

    • verificationUriComplete (string) --

      An alternate URL that the client can use to automatically launch a browser. This process skips the manual step in which the user visits the verification page and enters their code.

    • expiresIn (integer) --

      Indicates the number of seconds in which the verification code will become invalid.

    • interval (integer) --

      Indicates the number of seconds the client must wait between attempts when polling for a session.

Exceptions

  • SSOOIDC.Client.exceptions.InvalidRequestException
  • SSOOIDC.Client.exceptions.InvalidClientException
  • SSOOIDC.Client.exceptions.UnauthorizedClientException
  • SSOOIDC.Client.exceptions.SlowDownException
  • SSOOIDC.Client.exceptions.InternalServerException