Studio execute flow
Hello everyone,
I was reading through the docs on how to execute the studio flow programmatically. Based on the documentation reference I'm trying to trigger it through the REST API call.
The documentation says that to param can be other identifier than a phone number.
The Contact phone number (or other identifier) to start a Studio Flow Execution, available as variable
I was trying to send a user identifier that was used to create a participant for the conversation but I always get the following error in the logs
Failure sending message: The 'To' number 19 is not a valid phone number.
What I'm trying to achieve with this is that flow is triggered automatically where I get a welcoming message after which the bot is listening for a reply from the user.
Previously I would send a dummy message just to trigger the flow, but now I'm trying to do so with execution. Heres the sample code:
Any help would be appreciated on whether the approach is wrong or I'm sending invalid data to the REST endpoint.
Thanks,
Aleksandar
Answers
-
Hi, @ssengupta @Suvink are you guys able to help with this?
-
Hi @mappdevs1, This needs deeper investigation. At first glance, it sounds like you are sending
to
orfrom
params in wrong format. I cannot see it in your code as it is currently replacing withvariable
. Will you mind filling a support ticket at [email protected] with Execution SID (FNxxxxx) so that we can take a look? Thanks! -
@ssengupta Thank you for your reply. For the
to
param, I'm using the unique identifier from our DB, in this case, user id (19) instead of a phone number. As for thefrom
param I'm using the messaging service SIDMG108f6141bb269d33xxxx
.19
is for sure not a valid phone number, but I should be able to use another identifier since I'm using the studio flow for programmable chat only, instead of using text messages or call -
Hi,
Please try with a valid phone number and let us know how it goes. Feel free to share the Execution SID to [email protected] and our Dev support team will be able to assist you further! Happy Coding!
-
@ssengupta I think the issue here is that the docs suggest you can use a phone number or another identifier.
The Contact phone number (or other identifier) to start a Studio Flow Execution, available as variable
{{contact.channel.address}}
(emphasis mine)
Is there any way to use a non-phone number as the
To
parameter when calling the Studio Flow's REST trigger? -
@pnash Any update on this issue?
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups