whatsapp-business-java-api
whatsapp-business-java-api copied to clipboard
Template name does not exist in the translation | template name does not exist in en
Please correct me : ` WhatsappBusinessCloudApi whatsappBusinessCloudApi = factory.newBusinessCloudApi();
var message = MessageBuilder.builder()//
.setTo(PHONE_NUMBER_1)//
.buildTemplateMessage(//
new TemplateMessage()//
.setLanguage(new Language(LanguageType.EN))//
.setName("schedule_confirmation3")//
.addComponent(new BodyComponent()//
.addParameter(new TextParameter("Mauricio"))//
.addParameter(new TextParameter("04/11/2022"))//
.addParameter(new TextParameter("14:30")))//
.addComponent(new ButtonComponent()//
.setIndex(0)//
.setSubType(ButtonSubType.QUICK_REPLY)//
.addParameter(new ButtonPayloadParameter("OP_YES_48547")))//
.addComponent(new ButtonComponent()//
.setIndex(1)//
.setSubType(ButtonSubType.QUICK_REPLY)//
.addParameter(new ButtonPayloadParameter("OP_NO_48548")))//
.addComponent(new ButtonComponent(2, ButtonSubType.QUICK_REPLY)//
.addParameter(new ButtonPayloadParameter("OP_CH_48549")))//
);
whatsappBusinessCloudApi.sendMessage(PHONE_NUMBER_ID, message);
}`
I assume this code create a Template and then I can use it to send a Message , i am not sure if this is the situation or do i need to create a template manual , i have copied this code from one of this repo Test unites
I am testing this code in Java 17 and i got an error Messsage like below
Exception in thread "main" com.whatsapp.api.exception.WhatsappApiException: [132001] (#132001) Template name does not exist in the translation | template name (schedule_confirmation3) does not exist in en at com.whatsapp.api.WhatsappApiServiceGenerator.executeSync(WhatsappApiServiceGenerator.java:142) at com.whatsapp.api.impl.WhatsappBusinessCloudApi.sendMessage(WhatsappBusinessCloudApi.java:52) at com.waba.connector.WabaConnectorApplication.main(WabaConnectorApplication.java:54)