Posts tagged with twilio-api

We are currently in the process of implementing the Whatsapp Embedded Signup fucntionality that will be required by Twilio later in the year.

We've followed the documentation and we think we haven't made any mistakes.

In our front-end, everything works fine. The correct Whatsapp Business Account ID and Phone Number ID are retrieved from the Meta window.

After this we attempt to register these credentials to a new subaccount in Twilio using Twilio's Java library. We retrieve the phone number to use as the sender using Meta's API.

The step that fails is registering a Whatsapp Sender on the Twilio subaccount. This is done the following way:

private LinkedPhoneNumberResponseDto linkTwilioPhoneNumber(String countryCode, String phoneNumber, Account account, Long wabaId) {         TwilioCreateRequestDto body = TwilioCreateRequestDto.builder()                 .configuration(WhatsappTwilioConnectionConfigurationRequestDto.builder()                         .wabaId(wabaId.toString())                         .build())                 .senderId("whatsapp:" + countryCode + phoneNumber)                 .profile(WhatsappTwilioConnectionProfileRequestDto.builder()                         .name(account.getFriendlyName())                         .build())                 .build();         log.info("RequestBody is: {}", body);         log.info("ACC INFO = {}:{}:{}:{}", account.getSid(), account.getAuthToken(), account.getFriendlyName(), account.getStatus());         ResponseEntity<LinkedPhoneNumberResponseDto> res = restClient                 .post()                 .uri("https://messaging.twilio.com/v2/Channels/Senders")                 .headers(headers -> {                     headers.setContentType(MediaType.APPLICATION_JSON);                     headers.setBasicAuth(account.getSid(), account.getAuthToken());                 })                 .body(body)                 .accept(MediaType.ALL)                 .retrieve()                 .toEntity(LinkedPhoneNumberResponseDto.class);         if (res.getStatusCode().is2xxSuccessful()) {             return res.getBody();         } else {             throw new BadRequestException("Something went wrong linking the phone number to Twilio");         }     } 

For some reason, no matter what phone number we use, we always get the validation error.

We've already tried making the request thorugh Postman instead of Twilio's Java library. We've also tried three different phone numbers. Multiple Whatsapp Business Accounts have also been used.

Any help would be appreciated.

I have successfully created a webhook and configured it to handle incoming messages and send responses using Twilio's API. However, I'm currently using a Twilio-provided WhatsApp Business number. I need to switch to my existing WhatsApp Business number so that when clients message my number, it triggers the webhook and Twilio API sends the response.

1.Created a Twilio account and set up the WhatsApp Sandbox for testing. 2.Verified my WhatsApp Business number with WhatsApp. 3.Configured webhook URLs in the Twilio console to handle incoming messages. 4.Successfully handled incoming messages and sent responses using Twilio's provided number.

I’m developing a custom crm in react and nodejs.

I need to integrate a box in which the user/operator can message through whatsapp to the customers.

I read that I can’t use the iframe cause there are some several restrictions.

How can I add this feature?

ps: I don’t want to open new tab in the browser and redirect to whatsapp web.

I'm curious if Twilio has any plans to support the creation and sending of carousel templates for WhatsApp, as outlined in Facebook's documentation: Carousel Templates.

In the meantime, is there a way to create and get approval for these templates directly through WhatsApp Business API (WABA) and then, once approved, send them via Twilio?

Thanks for any insights or guidance!

I`m would like to send a carousel using twilio.

  1. I am a quite sure that, the number used in Whatsapp business api can not be used directly in whatsapp app or whatsapp business app, still can anyone confirm that??

  2. If to receive and respond to the user Initiated message we need to form an UI interface, what are the possibilities and what is the best option to do so??

  • One, I thought was created our own chat UI, which I think will be time consuming and complicated.
  • Second, I am looking toward twilio's chat and conversation option. It is mentioned on twilio site that twilio-chats is depreciated. So I was looking forward to use twilio conversation.

But before going deep into twilio conversation apis and their documentation I would like to know if it will fit my use case.

Need - Can I use twilio conversation such that, I can connect my verified sender to 3-4 separate whatsapp numbers to respond form their individual whatsapp or whatsapp-business app, to all the user initiated conversation.

If possible can I get some specific documentation or guidance for it??