newBusinessCloudApi () // retrieve the media file url var mediaUrl = whatsappBusinessCloudApi. newInstance ( TOKEN ) WhatsappBusinessCloudApi whatsappBusinessCloudApi = factory. WhatsappApiFactory factory = WhatsappApiFactory. You can use 4 different endpoints to manage your media: Orders products being sold by the businessĢ- When the status for a message received by a business changes (includes pricing information)ģ- When WhatsApp Business Management API updates:.Asks for information about a specific product.Updates their profile information such as their phone number.Clicks a call-to-actions button on an Ad that Clicks to WhatsApp.Clicks a reply button set up by the business.Sends location information to the business.Sends contact information to the business.Sends an image, video, audio, document, or sticker to the business.payload = the webhook payload json sent by Whatsapp //using nstructEvent() to deserialize event WebHookEvent event = WebHook. See Whatsapp api documentation for more details. ![]() ![]() WebHook objects are mapped on WebHookEvent class Webhooks are triggered when a customer performs an action or the status for a message a business sends a customer changes. createMessageTemplate ( WABA_ID, template ) setText ( "Utilize um dos botões abaixo para a confirmação" )) var response = whatsappBusinessCloudApi. addButton ( new QuickReplyButton ( "REMARCAR" ) // ) ) //. addButton ( new QuickReplyButton ( "NÃO" )) //. addButton ( new QuickReplyButton ( "SIM" )) //. addComponent ( new ButtonComponent () //. bold ( "3h" ) + ".\nVocê confirma que comparecerá?" ) //. bold ( "1" ) + ", passando aqui para confirmar seu horário no dia " + Formatter. setText ( "Confirmação de Atendimento" ) //. addComponent ( new HeaderComponent () //. newBusinessManagementApi () var template = new MessageTemplate () template. newInstance ( TOKEN ) WhatsappBusinessManagementApi whatsappBusinessCloudApi = factory. sendMessage ( PHONE_NUMBER_ID, message ) System. setText ( "Footer Text" )) // ) MessageResponse messageResponse = whatsappBusinessCloudApi. setDescription ( "SECTION_2_ROW_3_DESCRIPTION" )) // ) ) //. setDescription ( "SECTION_2_ROW_2_DESCRIPTION" )) //. setDescription ( "SECTION_2_ROW_1_DESCRIPTION" )) //. setDescription ( "SECTION_1_ROW_3_DESCRIPTION" )) // ) //. setDescription ( "SECTION_1_ROW_2_DESCRIPTION" )) //. setDescription ( "SECTION_1_ROW_1_DESCRIPTION" )) //. buildInteractiveMessage ( InteractiveMessage. newBusinessCloudApi () var message = MessageBuilder. TOKEN ) WhatsappBusinessCloudApi whatsappBusinessCloudApi = factory. Add the JitPack repository to your build file: This library is compatible with java 17+.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |