:doc:`SSOOIDC <../../sso-oidc>` / Client / start_device_authorization

**************************
start_device_authorization
**************************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization>`_  


  **Request Syntax**
  ::

    response = client.start_device_authorization(
        clientId='string',
        clientSecret='string',
        startUrl='string'
    )
    
  :type clientId: string
  :param clientId: **[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.

    

  
  :type clientSecret: string
  :param clientSecret: **[REQUIRED]** 

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

    

  
  :type startUrl: string
  :param startUrl: **[REQUIRED]** 

    The URL for the Amazon Web Services access portal. For more information, see `Using the Amazon Web Services access portal <https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html>`__ in the *IAM Identity Center User Guide*.

    

  
  
  :rtype: 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**
  
  *   :py:class:`SSOOIDC.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.InvalidClientException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.UnauthorizedClientException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.SlowDownException`

  
  *   :py:class:`SSOOIDC.Client.exceptions.InternalServerException`

  