Azure-Samples / Azure-Samples/communication-services-dotnet-quickstarts

WhatsApp send catalog Template

Open
#169 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
114
Forks
145
PR merge metrics
No merged PRs in 30d

Description

Greeting,

I already sent successfully other template models, but catalog template it fail. There is missing params that's I did not find any exemple online to follow it.

I'm using this code to send catalog template.
var recipientList = new List { phone };
var messageTemplate = new MessageTemplate(templateName, templateLanguage);
var templateContent = new TemplateNotificationContent(Guid.Parse(channelRegistrationId), recipientList, messageTemplate);

// Send template message
var sendTemplateMessageResult = await m_currentNotificationMessagesClient.SendAsync(templateContent);

![Annotation 2024-07-09 092239](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/assets/170094015/06cfcdf0-0adf-4d79-8730-7b20f6667f70)

==============================
{"error":{"code":"BadRequest","message":"Given request contains a parameter for WhatsApp which was invalid. This includes channel ID and template parameters.","innererror":{"code":"WaErrorCode.InvalidParameter","message":"InvalidParameter: (#131008) Required parameter is missing"}}}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.