Open bhavesh53 opened 10 months ago
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!
Hello. The mentioned example is sending a media ID generated from the Resumable Upload API It's a longer process for uploading files.
An alternative would be to send the media identification "url." To make it easier, follow the UploadMediaExample and RetrieveMediaUrlExample samples, which will return the "url" you can use in the addHeaderHandleExamples
Hello @Cavassoni i tried but when ever i upload with below code . but its rejected instantly .
var template = new MessageTemplate();
template.setName("template_310823")
.setCategory(Category.MARKETING)
.setLanguage(LanguageType.EN)
.addComponent(new HeaderComponent().setFormat(HeaderFormat.IMAGE)
.setExample(new Example().addHeaderHandleExamples()
.addHeaderHandleExamples("https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=9xxx89620xxxxxxx&ext=1693xxxxxx&hash=ATtrDAQxxxxxxxxxx")))
.addComponent(new BodyComponent()//
.setText("this is example body"));
Hello @bhavesh53, we don't have support for the Resumable Upload API yet. This is the API that returns the "id" used in the examples. We'll be adding this functionality soon.
There's an example of how this API works in a Postman collection, which can be accessed at this link.
Hello want to know how to add Example Image in Template Creation. i found below example but I don't understand which data need to pass in addHeaderHandleExamples argument .
https://github.com/Bindambc/whatsapp-business-java-api/blob/95580cfebc9de0610d7f7c9730192bc4f228fcf1/src/test/java/com/whatsapp/api/examples/CreateMessageTemplate6Example.java#L35C1-L35C1