start_device_authorization
¶
start_device_authorization(
client_id: ClientId,
client_secret: ClientSecret,
start_url: URI,
*,
config_overrides: Optional[SSOOIDCClientConfig] = None,
) -> StartDeviceAuthorizationResponse
Initiates device authorization by requesting a pair of verification codes from the authorization service.
Parameters:
-
client_id(ClientId) –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.
-
client_secret(ClientSecret) –A secret string that is generated for the client. This value should come from the persisted result of the RegisterClient API operation.
-
start_url(URI) –The URL for the Amazon Web Services access portal. For more information, see Using the Amazon Web Services access portal in the IAM Identity Center User Guide.
Raises:
-
InternalServerException–Indicates that an error from the service occurred while trying to process a request.
-
InvalidClientException–Indicates that the
clientIdorclientSecretin the request is invalid. For example, this can occur when a client sends an incorrectclientIdor an expiredclientSecret. -
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter might be missing or out of range.
-
SlowDownException–Indicates that the client is making the request too frequently and is more than the service can handle.
-
UnauthorizedClientException–Indicates that the client is not currently authorized to make the request. This can happen when a
clientIdis not issued for a public client. -
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Call OAuth/OIDC /start-device-authorization endpoint
>>> client.start_device_authorization(client_id='_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID', client_secret='VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0', start_url='https://identitycenter.amazonaws.com/ssoins-111111111111')