I have a Twilio Trial account with a number that has SMS/MMS enabled.
I want to use the number in a group MMS chat. I have a very basic test that I created after following the tutorial on Tut
The two numbers I'm attempting to send to have been verified. I'm able to send messages to these numbers individually, just not in a group chat. Please see code below
const accountSid = "ACCOUNT_SID";
const authToken = "AUTHO_TOKEN";
const client = require('twilio')(accountSid, authToken);
(async () => {
const conversation = await client.conversations.v1.conversations.create({ friendlyName: 'TEST' });
const participant = await client.conversations.v1.conversations(conversation.sid)
.participants
.create({
identity: 'realEstateAgent',
'messagingBinding.projectedAddress': '+TWILIO_NUMBER'
});
const one = await client.conversations.v1.conversations(conversation.sid)
.participants
.create({ 'messagingBinding.address': '+NUM_1' });
const two = await client.conversations.v1.conversations(conversation.sid)
.participants
.create({ 'messagingBinding.address': '+NUM_2' });
const msg = await client.conversations.v1.conversations(conversation.sid)
.messages
.create({
body: 'This is a test message',
author: 'realEstateAgent'
})
.then(message => console.log(message.sid));
})();
Everything appears to run successfully and the message.sid
gets logged out. However, none of the numbers receive the message. But, this same code works if I just send to one number.
Messaging logs show that message has been sent
to both numbers, but not delivered. It doesn't say anything else making me believe an error occurred.
Any Insights?
Thanks!