Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldwight authored Aug 6, 2022
1 parent 23b62e4 commit d501e55
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,19 @@ return Ok();
}
```

## Reply to Message
```c#
TextMessageReplyRequest textMessageReplyRequest = new TextMessageReplyRequest();
textMessageReplyRequest.Context = new TextMessageContext();
textMessageReplyRequest.Context.MessageId = textMessage.SingleOrDefault().Id;
textMessageReplyRequest.To = textMessage.SingleOrDefault().From;
textMessageReplyRequest.Text = new WhatsAppText();
textMessageReplyRequest.Text.Body = "Your Message was received. Processing the request shortly";
textMessageReplyRequest.Text.PreviewUrl = false;

await _whatsAppBusinessClient.SendTextMessageAsync(textMessageReplyRequest);
```

## Error handling
WhatsAppBusinessClient Throws ```WhatsappBusinessCloudAPIException``` It is your role as the developer to catch
the exception and continue processing in your aplication. Snippet below shows how you can catch the WhatsappBusinessCloudAPIException.
Expand Down

0 comments on commit d501e55

Please sign in to comment.