MessageTemplateClient Class

  • java.lang.Object
    • com.azure.communication.messages.MessageTemplateClient

public final class MessageTemplateClient

Initializes a new instance of the synchronous MessageTemplateClient type.

Method Summary

Modifier and Type Method and Description
PagedIterable<MessageTemplateItem> listTemplates(String channelId)

List all templates for given Azure Communication Services channel.

PagedIterable<BinaryData> listTemplates(String channelId, RequestOptions requestOptions)

List all templates for given Azure Communication Services channel.

Methods inherited from java.lang.Object

Method Details

listTemplates

public PagedIterable listTemplates(String channelId)

List all templates for given Azure Communication Services channel.

Parameters:

channelId - The registration ID of the channel.

Returns:

paged collection of MessageTemplateItem items as paginated response with PagedIterable<T>.

listTemplates

public PagedIterable listTemplates(String channelId, RequestOptions requestOptions)

List all templates for given Azure Communication Services channel.

Query Parameters

| ----------- | ------- | -------- | ------------------------------------- |
| Name        | Type    | Required | Description                           |
| maxpagesize | Integer | No       | Number of objects to return per page. |

You can add these to a request with RequestOptions#addQueryParam

Response Body Schema

{
     kind: String(whatsApp) (Required)
     name: String (Required)
     language: String (Required)
     status: String(approved/rejected/pending/paused) (Required)
 }

Parameters:

channelId - The registration ID of the channel.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

paged collection of MessageTemplateItem items as paginated response with PagedIterable<T>.

Applies to