ChimeSDKMessaging / Client / list_channels
list_channels¶
- ChimeSDKMessaging.Client.list_channels(**kwargs)¶
- Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results. - Functionality & restrictions- Use privacy = - PUBLICto retrieve all public channels in the account.
- Only an - AppInstanceAdmincan set privacy =- PRIVATEto list the private channels in an account.
 - Note- The - x-amz-chime-bearerrequest header is mandatory. Use the ARN of the- AppInstanceUseror- AppInstanceBotthat makes the API call as the value in the header.- See also: AWS API Documentation - Request Syntax- response = client.list_channels( AppInstanceArn='string', Privacy='PUBLIC'|'PRIVATE', MaxResults=123, NextToken='string', ChimeBearer='string' ) - Parameters:
- AppInstanceArn (string) – - [REQUIRED] - The ARN of the - AppInstance.
- Privacy (string) – The privacy setting. - PUBLICretrieves all the public channels.- PRIVATEretrieves private channels. Only an- AppInstanceAdmincan retrieve private channels.
- MaxResults (integer) – The maximum number of channels that you want to return. 
- NextToken (string) – The token passed by previous API calls until all requested channels are returned. 
- ChimeBearer (string) – - [REQUIRED] - The ARN of the - AppInstanceUseror- AppInstanceBotthat makes the API call.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'Channels': [ { 'Name': 'string', 'ChannelArn': 'string', 'Mode': 'UNRESTRICTED'|'RESTRICTED', 'Privacy': 'PUBLIC'|'PRIVATE', 'Metadata': 'string', 'LastMessageTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } - Response Structure- (dict) – - Channels (list) – - The information about each channel. - (dict) – - Summary of the details of a - Channel.- Name (string) – - The name of the channel. 
- ChannelArn (string) – - The ARN of the channel. 
- Mode (string) – - The mode of the channel. 
- Privacy (string) – - The privacy setting of the channel. 
- Metadata (string) – - The metadata of the channel. 
- LastMessageTimestamp (datetime) – - The time at which the last persistent message visible to the caller in a channel was sent. 
 
 
- NextToken (string) – - The token returned from previous API requests until the number of channels is reached. 
 
 
 - Exceptions