

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# AWS End User Messaging Social에서 템플릿 메시지를 보내는 예제
<a name="send-message-text"></a>

전송할 수 있는 메시지 템플릿 유형에 대한 자세한 내용은 *WhatsApp Business Platform Cloud API* 참조의 [메시지 템플릿을](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates) 참조하세요. 전송할 수 있는 메시지 유형 목록은 *WhatsApp Business Platform Cloud API* 참조의 [메시지를 참조하세요](https://developers.facebook.com/docs/whatsapp/conversation-types/).

다음 예제에서는 템플릿을 사용하여를 사용하여 고객에게 [메시지를 보내는](https://docs.aws.amazon.com//social-messaging/latest/APIReference/API_SendWhatsAppMessage.html) 방법을 보여줍니다 AWS CLI. 구성에 대한 자세한 내용은 [AWS Command Line Interface 사용 설명서](https://docs.aws.amazon.com/cli/latest/userguide/)[의 구성을 AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) AWS CLI참조하세요.

**참고**  
 AWS CLI 버전 2를 사용할 때는 base64 인코딩을 지정해야 합니다. 이 작업은 AWS CLI 파라미터 추가 `--cli-binary-format raw-in-base64-out` 또는 AWS CLI 전역 구성 파일 변경을 통해 수행할 수 있습니다. 자세한 내용은 버전 2용 명령줄 인터페이스 사용 설명서[https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-settings](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-settings)의 섹션을 참조하세요. *AWS * 

```
aws socialmessaging send-whatsapp-message --message '{"messaging_product":"whatsapp","to":"'{PHONE_NUMBER}'","type":"template","template":{"name":"statement","language":{"code":"en_US"},"components":[{"type":"body","parameters":[{"type":"text","text":"1000"}]}]}}' --origination-phone-number-id {ORIGINATION_PHONE_NUMBER_ID} --meta-api-version v20.0
```

위의 명령에서 다음을 수행합니다.
+ *\$1PHONE\$1NUMBER\$1*를 고객의 전화번호로 바꿉니다.
+ *\$1ORIGINATION\$1PHONE\$1NUMBER\$1ID\$1*를 전화번호의 ID로 바꿉니다.

다음 예제에서는 구성 요소가 포함되지 않은 템플릿 메시지를 보내는 방법을 보여줍니다.

```
aws socialmessaging send-whatsapp-message --message '{"messaging_product": "whatsapp","to": "'{PHONE_NUMBER}'","type": "template","template": {"name":"simple_template","language": {"code": "en_US"}}}' --origination-phone-number-id {ORIGINATION_PHONE_NUMBER_ID} --meta-api-version v20.0
```
+ *\$1PHONE\$1NUMBER\$1*를 고객의 전화번호로 바꿉니다.
+ *\$1ORIGINATION\$1PHONE\$1NUMBER\$1ID\$1*를 전화번호의 ID로 바꿉니다.