Bindambc/whatsapp-business-java-api

Update Template Error

Opened this issue · 1 comments

Hi, i try to do a update in a Whatsapp Template, and i have received this error:
ex = (com.whatsapp.api.exception.WhatsappApiException) com.whatsapp.api.exception.WhatsappApiException: Unknown path components: /2798878760278631

in documentation of whatsapp graph api have this for update message template:
https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/
in edition section:
POST /<WHATSAPP_MESSAGE_TEMPLATE_ID>
example:
curl 'https://graph.facebook.com/v20.0/564750795574598'
-H 'Content-Type: application/json'
-H 'Authorization: Bearer EAAJB...'
-d '........

We need send only the message-template-id. Don´t need the whatsapp-business-account-ID

in class: WhatsappBusinessManagementApiService:

@POST("/{api-version}/{whatsapp-business-account-ID}/message_templates/{message-template-id}")
Call<Template> updateMessageTemplate(@Path("api-version") String apiVersion, @Path("whatsapp-business-account-ID") String whatsappBusinessAccountId, @Path("message-template-id") String messageTemplateId, @Body MessageTemplate messageTemplate);

i change for:

@POST("/{api-version}/{message-template-id}")
Call<Template> updateMessageTemplate(@Path("api-version") String apiVersion, @Path("message-template-id") String messageTemplateId, @Body MessageTemplate messageTemplate);

And update template works.

thanks and congratulations for the project is amazing.

Hello and welcome! We're glad to see that you've opened your first issue. We appreciate your contribution and would love to hear more about the problem you're experiencing. Our team is actively monitoring this repository and we will do our best to respond to your issue as soon as possible. Thank you for using our project and we look forward to working with you!