I’m developing an API using Spring that includes the functionality to start a conversation with a user via WhatsApp. I’m following the Twilio documentation, but the message isn’t reaching the user’s WhatsApp. The log doesn’t return any errors, so I’m unsure what’s going wrong.
Here’s the relevant code snippet:
Message message1 = Message.creator(new PhoneNumber("whatsapp:" + salesManWhatsapp), new PhoneNumber("whatsapp:" + companyWhatsapp), TEMPLATE_SID) .setContentSid(TEMPLATE_SID) .setContentVariables(contentVariables) .setMessagingServiceSid(MESSAGING_SID) .create();
The big problem here is that Twilio is accepting my request, so I don’t know where I am making a mistake.
I tried a lot of things, put the messaging sid in the “from” field of the creator, using different combinations and etc.
heisk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.