:doc:`WorkMail <../../workmail>` / Client / get_personal_access_token_metadata

**********************************
get_personal_access_token_metadata
**********************************



.. py:method:: WorkMail.Client.get_personal_access_token_metadata(**kwargs)

  

  Requests details of a specific Personal Access Token within the WorkMail organization.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetPersonalAccessTokenMetadata>`_  


  **Request Syntax**
  ::

    response = client.get_personal_access_token_metadata(
        OrganizationId='string',
        PersonalAccessTokenId='string'
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The Organization ID.

    

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

    The Personal Access Token ID.

    

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

    
    ::

      {
          'PersonalAccessTokenId': 'string',
          'UserId': 'string',
          'Name': 'string',
          'DateCreated': datetime(2015, 1, 1),
          'DateLastUsed': datetime(2015, 1, 1),
          'ExpiresTime': datetime(2015, 1, 1),
          'Scopes': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PersonalAccessTokenId** *(string) --* 

        The Personal Access Token ID.

        
      

      - **UserId** *(string) --* 

        The WorkMail User ID.

        
      

      - **Name** *(string) --* 

        The Personal Access Token name.

        
      

      - **DateCreated** *(datetime) --* 

        The date when the Personal Access Token ID was created.

        
      

      - **DateLastUsed** *(datetime) --* 

        The date when the Personal Access Token ID was last used.

        
      

      - **ExpiresTime** *(datetime) --* 

        The time when the Personal Access Token ID will expire.

        
      

      - **Scopes** *(list) --* 

        Lists all the Personal Access Token permissions for a mailbox.

        
        

        - *(string) --* 
    
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationStateException`

  