ChimeSDKMessaging / Client / get_channel_message

get_channel_message#

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

Request Syntax

response = client.get_channel_message(
    ChannelArn='string',
    MessageId='string',
    ChimeBearer='string',
    SubChannelId='string'
)
Parameters:
  • ChannelArn (string) –

    [REQUIRED]

    The ARN of the channel.

  • MessageId (string) –

    [REQUIRED]

    The ID of the message.

  • ChimeBearer (string) –

    [REQUIRED]

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

  • SubChannelId (string) –

    The ID of the SubChannel in the request.

    Note

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

Return type:

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'
    }
}

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 message content.

      • 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 messasge status.

      • MessageAttributes (dict) –

        The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences.

        • (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.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException

  • ChimeSDKMessaging.Client.exceptions.ForbiddenException

  • ChimeSDKMessaging.Client.exceptions.NotFoundException

  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException

  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException

  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException

  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException