Condividi tramite


NotificationMessagesClient Class

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

public final class NotificationMessagesClient

Initializes a new instance of the synchronous NotificationMessagesClient type.

Method Summary

Modifier and Type Method and Description
BinaryData downloadMedia(String mediaId)

Download the Media payload from a User to Business message.

Response<BinaryData> downloadMediaWithResponse(String mediaId, RequestOptions requestOptions)

Download the Media payload from a User to Business message.

SendMessageResult send(NotificationContent notificationContent)

Sends a notification message from Business to User.

Response<BinaryData> sendWithResponse(BinaryData notificationContent, RequestOptions requestOptions)

Sends a notification message from Business to User.

Methods inherited from java.lang.Object

Method Details

downloadMedia

public BinaryData downloadMedia(String mediaId)

Download the Media payload from a User to Business message.

Parameters:

mediaId - The stream ID.

Returns:

the response.

downloadMediaWithResponse

public Response downloadMediaWithResponse(String mediaId, RequestOptions requestOptions)

Download the Media payload from a User to Business message.

Response Body Schema

BinaryData

Parameters:

mediaId - The stream ID.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the response body along with Response<T>.

send

public SendMessageResult send(NotificationContent notificationContent)

Sends a notification message from Business to User.

Parameters:

notificationContent - Details of the message to send.

Returns:

result of the send message operation.

sendWithResponse

public Response sendWithResponse(BinaryData notificationContent, RequestOptions requestOptions)

Sends a notification message from Business to User.

Header Parameters

| ------------------------ | ------ | -------- | -------------------------------------------- |
| Name                     | Type   | Required | Description                                  |
| repeatability-request-id | String | No       | Repeatability request ID header              |
| repeatability-first-sent | String | No       | Repeatability first sent header as HTTP-date |

You can add these to a request with RequestOptions#addHeader

Request Body Schema

{
     kind: String(text/image/image_v0/document/video/audio/template) (Required)
     channelRegistrationId: String (Required)
     to (Required): [
         String (Required)
     ]
 }

Response Body Schema

{
     receipts (Required): [
          (Required){
             messageId: String (Required)
             to: String (Required)
         }
     ]
 }

Parameters:

notificationContent - Details of the message to send.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

result of the send message operation along with Response<T>.

Applies to