Chime / Client / create_channel_ban



Permanently bans a member from a channel. Moderators can’t add banned members to a channel. To undo a ban, you first have to DeleteChannelBan, and then CreateChannelMembership. Bans are cleaned up when you delete users or channels.

If you ban a user who is already part of a channel, that user is automatically kicked from the channel.


The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.


This API is is no longer supported and will not be updated. We recommend using the latest version, CreateChannelBan, in the Amazon Chime SDK.

Using the latest version requires migrating to a dedicated namespace. For more information, refer to Migrating from the Amazon Chime namespace in the Amazon Chime SDK Developer Guide.


This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.create_channel_ban(
  • ChannelArn (string) –


    The ARN of the ban request.

  • MemberArn (string) –


    The ARN of the member being banned.

  • ChimeBearer (string) – The AppInstanceUserArn of the user that makes the API call.

Return type:



Response Syntax

    'ChannelArn': 'string',
    'Member': {
        'Arn': 'string',
        'Name': 'string'

Response Structure

  • (dict) –

    • ChannelArn (string) –

      The ARN of the response to the ban request.

    • Member (dict) –

      The ChannelArn and BannedIdentity of the member in the ban response.

      • Arn (string) –

        The ARN in an Identity.

      • Name (string) –

        The name in an Identity.


  • Chime.Client.exceptions.BadRequestException

  • Chime.Client.exceptions.ForbiddenException

  • Chime.Client.exceptions.UnauthorizedClientException

  • Chime.Client.exceptions.ConflictException

  • Chime.Client.exceptions.ResourceLimitExceededException

  • Chime.Client.exceptions.ThrottledClientException

  • Chime.Client.exceptions.ServiceUnavailableException

  • Chime.Client.exceptions.ServiceFailureException