You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/advanced-messaging/whatsapp/includes/get-started/messages-quickstart-python.md
+5-42Lines changed: 5 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -282,18 +282,6 @@ Add send_template_message() call to the [main method](#basic-program-structure).
282
282
283
283
Now, the user needs to respond to the template message. From the WhatsApp user account, reply to the template message received from the WhatsApp Business Account. The content of the message is irrelevant for this scenario.
284
284
285
-
#### Run the code for send template based message
286
-
287
-
To run the code, make sure you are on the directory where your `messages-quickstart.py` file is.
288
-
289
-
```console
290
-
python messages-quickstart.py
291
-
```
292
-
293
-
```output
294
-
Azure Communication Services - Advanced Messages Quickstart
295
-
WhatsApp Templated Message with message id <GUID> was successfully sent to <ToRecipient>.
296
-
```
297
285
298
286
> [!IMPORTANT]
299
287
> The recipient must respond to the template message to initiate the conversation before text or media message can be delivered to the recipient.
@@ -346,19 +334,6 @@ Update the [main method](#basic-program-structure) to run send_text_message()
346
334
messages.send_text_message()
347
335
```
348
336
349
-
#### Run the code for send text message
350
-
351
-
To run the code, make sure you are on the directory where your `messages-quickstart.py` file is.
352
-
353
-
```console
354
-
python messages-quickstart.py
355
-
```
356
-
357
-
```output
358
-
Azure Communication Services - Advanced Messages Quickstart
359
-
WhatsApp Text Message with message id <GUID> was successfully sent to <ToRecipient>.
360
-
```
361
-
362
337
### Send a media message to a WhatsApp user
363
338
364
339
Messages SDK allows Contoso to send Image WhatsApp messages to WhatsApp users. To send Image embedded messages below details are required:
@@ -404,7 +379,8 @@ Update the [main method](#basic-program-structure) to run send_image_message()
404
379
messages.send_image_message()
405
380
```
406
381
407
-
#### Run the code for send image based message
382
+
383
+
## Run the code
408
384
409
385
To run the code, make sure you are on the directory where your `messages-quickstart.py` file is.
410
386
@@ -414,7 +390,9 @@ python messages-quickstart.py
414
390
415
391
```output
416
392
Azure Communication Services - Advanced Messages Quickstart
417
-
WhatsApp Image containing Message with message id <GUID> was successfully sent to <ToRecipient>.
393
+
WhatsApp Templated Message with message id <<GUID>> was successfully sent to <<ToRecipient>>
394
+
WhatsApp Text Message with message id <<GUID>> was successfully sent to <<ToRecipient>>
395
+
WhatsApp Image containing Message with message id <<GUID>> was successfully sent to <<ToRecipient>>
418
396
```
419
397
420
398
## Full sample code
@@ -508,21 +486,6 @@ if __name__ == '__main__':
508
486
messages.send_image_message()
509
487
```
510
488
511
-
## Run the code
512
-
513
-
To run the code, make sure you are on the directory where your `messages-quickstart.py` file is.
514
-
515
-
```console
516
-
python messages-quickstart.py
517
-
```
518
-
519
-
```output
520
-
Azure Communication Services - Advanced Messages Quickstart
521
-
WhatsApp Templated Message with message id <<GUID>> was successfully sent to <<ToRecipient>>
522
-
WhatsApp Text Message with message id <<GUID>> was successfully sent to <<ToRecipient>>
523
-
WhatsApp Image containing Message with message id <<GUID>> was successfully sent to <<ToRecipient>>
524
-
```
525
-
526
489
### Other Samples
527
490
528
491
You can review and download other sample codes for Python Messages SDK on [GitHub](https://github.com/Azure-Samples/communication-services-python-quickstarts/tree/main/messages-quickstart).
0 commit comments