:doc:`ChimeSDKMessaging <../../chime-sdk-messaging>` / Client / get_channel_message

*******************
get_channel_message
*******************



.. py:method:: ChimeSDKMessaging.Client.get_channel_message(**kwargs)

  

  Gets the full details of a channel message.

   

  .. note::

    

    The ``x-amz-chime-bearer`` request header is mandatory. Use the ARN of the ``AppInstanceUser`` or ``AppInstanceBot`` that makes the API call as the value in the header.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/GetChannelMessage>`_  


  **Request Syntax**
  ::

    response = client.get_channel_message(
        ChannelArn='string',
        MessageId='string',
        ChimeBearer='string',
        SubChannelId='string'
    )
    
  :type ChannelArn: string
  :param ChannelArn: **[REQUIRED]** 

    The ARN of the channel.

    

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

    The ID of the message.

    

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

    The ARN of the ``AppInstanceUser`` or ``AppInstanceBot`` that makes the API call.

    

  
  :type SubChannelId: string
  :param SubChannelId: 

    The ID of the SubChannel in the request.

     

    .. note::

      

      Only required when getting messages in a SubChannel that the user belongs to.

      

    

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

    
    ::

      {
          'ChannelMessage': {
              'ChannelArn': 'string',
              'MessageId': 'string',
              'Content': 'string',
              'Metadata': 'string',
              'Type': 'STANDARD'|'CONTROL',
              'CreatedTimestamp': datetime(2015, 1, 1),
              'LastEditedTimestamp': datetime(2015, 1, 1),
              'LastUpdatedTimestamp': datetime(2015, 1, 1),
              'Sender': {
                  'Arn': 'string',
                  'Name': 'string'
              },
              'Redacted': True|False,
              'Persistence': 'PERSISTENT'|'NON_PERSISTENT',
              'Status': {
                  'Value': 'SENT'|'PENDING'|'FAILED'|'DENIED',
                  'Detail': 'string'
              },
              'MessageAttributes': {
                  'string': {
                      'StringValues': [
                          'string',
                      ]
                  }
              },
              'SubChannelId': 'string',
              'ContentType': 'string',
              'Target': [
                  {
                      'MemberArn': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ChannelMessage** *(dict) --* 

        The details of and content in the message.

        
        

        - **ChannelArn** *(string) --* 

          The ARN of the channel.

          
        

        - **MessageId** *(string) --* 

          The ID of a message.

          
        

        - **Content** *(string) --* 

          The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages originating from the bot. For more information, refer to `Processing responses from an AppInstanceBot <https://docs.aws.amazon.com/chime-sdk/latest/dg/appinstance-bots#process-response.html>`__ in the *Amazon Chime SDK Messaging Developer Guide*.

          
        

        - **Metadata** *(string) --* 

          The message metadata.

          
        

        - **Type** *(string) --* 

          The message type.

          
        

        - **CreatedTimestamp** *(datetime) --* 

          The time at which the message was created.

          
        

        - **LastEditedTimestamp** *(datetime) --* 

          The time at which a message was edited.

          
        

        - **LastUpdatedTimestamp** *(datetime) --* 

          The time at which a message was updated.

          
        

        - **Sender** *(dict) --* 

          The message sender.

          
          

          - **Arn** *(string) --* 

            The ARN in an Identity.

            
          

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

            The name in an Identity.

            
      
        

        - **Redacted** *(boolean) --* 

          Hides the content of a message.

          
        

        - **Persistence** *(string) --* 

          The persistence setting for a channel message.

          
        

        - **Status** *(dict) --* 

          The status of the channel message.

          
          

          - **Value** *(string) --* 

            The message status value.

            
          

          - **Detail** *(string) --* 

            Contains more details about the message status.

            
      
        

        - **MessageAttributes** *(dict) --* 

          The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific fields from the bot. For more information, refer to `Processing responses from an AppInstanceBot <https://docs.aws.amazon.com/chime-sdk/latest/dg/appinstance-bots#process-response.html>`__ in the *Amazon Chime SDK Messaging Developer Guide*.

          
          

          - *(string) --* 
            

            - *(dict) --* 

              A list of message attribute values.

              
              

              - **StringValues** *(list) --* 

                The strings in a message attribute value.

                
                

                - *(string) --* 
            
          
      
    
        

        - **SubChannelId** *(string) --* 

          The ID of the SubChannel.

          
        

        - **ContentType** *(string) --* 

          The content type of the channel message. For Amazon Lex V2 bot responses, the content type is ``application/amz-chime-lex-msgs`` for success responses and ``application/amz-chime-lex-error`` for failure responses. For more information, refer to `Processing responses from an AppInstanceBot <https://docs.aws.amazon.com/chime-sdk/latest/dg/appinstance-bots#process-response.html>`__ in the *Amazon Chime SDK Messaging Developer Guide*.

          
        

        - **Target** *(list) --* 

          The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

          
          

          - *(dict) --* 

            The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

            
            

            - **MemberArn** *(string) --* 

              The ARN of the target channel member.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.BadRequestException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.NotFoundException`

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

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ThrottledClientException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`ChimeSDKMessaging.Client.exceptions.ServiceFailureException`

  