Skip to content

Commit 84cb6c5

Browse files
committed
moving run the code section
1 parent 2760164 commit 84cb6c5

File tree

1 file changed

+5
-42
lines changed

1 file changed

+5
-42
lines changed

articles/communication-services/quickstarts/advanced-messaging/whatsapp/includes/get-started/messages-quickstart-python.md

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -282,18 +282,6 @@ Add send_template_message() call to the [main method](#basic-program-structure).
282282

283283
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.
284284

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-
```
297285

298286
> [!IMPORTANT]
299287
> 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()
346334
messages.send_text_message()
347335
```
348336

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-
362337
### Send a media message to a WhatsApp user
363338

364339
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()
404379
messages.send_image_message()
405380
```
406381

407-
#### Run the code for send image based message
382+
383+
## Run the code
408384

409385
To run the code, make sure you are on the directory where your `messages-quickstart.py` file is.
410386

@@ -414,7 +390,9 @@ python messages-quickstart.py
414390

415391
```output
416392
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>>
418396
```
419397

420398
## Full sample code
@@ -508,21 +486,6 @@ if __name__ == '__main__':
508486
messages.send_image_message()
509487
```
510488

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-
526489
### Other Samples
527490

528491
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

Comments
 (0)