Skip to content

Template name does not exist in the translation | template name does not exist in en #136

Open
@alkahtani

Description

@alkahtani

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions