File tree Expand file tree Collapse file tree 1 file changed +20
-29
lines changed
Expand file tree Collapse file tree 1 file changed +20
-29
lines changed Original file line number Diff line number Diff line change @@ -165,40 +165,31 @@ public async Task SendsTemplateAsync()
165165 {
166166 var ( configuration , client ) = Initialize ( ) ;
167167
168- // Send an interactive message with three buttons showcasing the payload/value
169- // being different than the button text
170- await client . SendAsync ( configuration [ "SendFrom" ] ! , new
168+ await client . SendTemplateAsync ( configuration [ "SendFrom" ] ! , configuration [ "SendTo" ] ! , new
171169 {
172- messaging_product = "whatsapp" ,
173- recipient_type = "individual" ,
174- to = configuration [ "SendTo" ] ! ,
175- type = "template" ,
176- template = new
170+ name = "reminder" ,
171+ language = new
177172 {
178- name = "reminder" ,
179- language = new
180- {
181- code = "es"
182- } ,
183- components = new [ ]
173+ code = "es"
174+ } ,
175+ components = new [ ]
176+ {
177+ new
184178 {
185- new
179+ type = "body" ,
180+ parameters = new [ ]
186181 {
187- type = "body" ,
188- parameters = new [ ]
182+ new
183+ {
184+ type = "text" ,
185+ parameter_name = "reminder_text" ,
186+ text = "Dentista"
187+ } ,
188+ new
189189 {
190- new
191- {
192- type = "text" ,
193- parameter_name = "reminder_text" ,
194- text = "Dentista"
195- } ,
196- new
197- {
198- type = "text" ,
199- parameter_name = "reminder_datetime" ,
200- text = "3pm"
201- }
190+ type = "text" ,
191+ parameter_name = "reminder_datetime" ,
192+ text = "3pm"
202193 }
203194 }
204195 }
You can’t perform that action at this time.
0 commit comments