twilio / twilio-node

Node.js helper library
MIT License
1.37k stars 495 forks source link

How to enable "Autocreate a Conversation" for my Messaging Service using the Node.js SDK? #954

Open hotmailbelike opened 10 months ago

hotmailbelike commented 10 months ago

Issue Summary

Using the SDK, how do I update my Messaging Service's "Integration" section's "Incoming Messages" options? I want to set it to "Autocreate a Conversation" I have attached a screenshot of the Twilio Console πŸ‘‡ image

I tried updating the Messaging Service's "useInboundWebhookOnNumber" to false but it did not have any effect (code sample given below)

Steps to Reproduce

  1. Log into your own Twilio Console
  2. Create your Messaging Service and note down its SID
  3. In your code initialize your Twilio Client using your auth token and account SID
  4. Run the code snippet given below, be sure to properly set your Messaging Service SID

Code Snippet

client.messaging.v1
            .services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .update({
                useInboundWebhookOnNumber: false,
            })
            .then((service) => {
                console.log(
                    'πŸ“£ -> file: twilio-message.service.ts:335 -> .then -> service:',
                    service,
                );
            });

Response Screenshot:

image

As you can see that the "useInboundWebhookOnNumber" is being set to false as I requested but the changes are not being reflected on the Twilio Console.

Technical details:

Please help me resolve this. This is one of the most important feature of my app, without this I can't create Conversations when SMS is sent from another number to my Twilio Number.