:doc:`BedrockAgentCore <../../bedrock-agentcore>` / Client / complete_resource_token_auth

****************************
complete_resource_token_auth
****************************



.. py:method:: BedrockAgentCore.Client.complete_resource_token_auth(**kwargs)

  

  Confirms the user authentication session for obtaining OAuth2.0 tokens for a resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/CompleteResourceTokenAuth>`_  


  **Request Syntax**
  ::

    response = client.complete_resource_token_auth(
        userIdentifier={
            'userToken': 'string',
            'userId': 'string'
        },
        sessionUri='string'
    )
    
  :type userIdentifier: dict
  :param userIdentifier: **[REQUIRED]** 

    The OAuth2.0 token or user ID that was used to generate the workload access token used for initiating the user authorization flow to retrieve OAuth2.0 tokens.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``userToken``, ``userId``. 

  
    - **userToken** *(string) --* 

      The OAuth2.0 token issued by the user’s identity provider

      

    
    - **userId** *(string) --* 

      The ID of the user for whom you have retrieved a workload access token for

      

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

    Unique identifier for the user's authentication session for retrieving OAuth2 tokens. This ID tracks the authorization flow state across multiple requests and responses during the OAuth2 authentication process.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCore.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ValidationException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ThrottlingException`

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

  