whatsapp-business-java-api
whatsapp-business-java-api copied to clipboard
Update Template Error
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.