I am currently using woocommerce for an online store and under woocommerce settings, there is an option for webhook, I am trying to trigger twilio flow by hitting the URL. but I get error code 401
. twilio 401 error says authentication wasn't provided. I included SID in url but still, get the same error. Does anyone have any idea on how to get woocommerce webhook to play nice with twilio?
Asked
Active
Viewed 201 times
-2

Ruvee
- 8,611
- 4
- 18
- 44

Vishal Desai
- 191
- 3
- 15
1 Answers
2
To trigger a Studio flow, you need to connect a widget or widgets under the REST API path of the Trigger Widget. You also need to call the Studio Flow using the cURL syntax below.
Trigger a Twilio Studio Flow Execution via the REST API
Maybe you can use a Twilio Function as a Proxy for your Webhook to call your Studio Flow (so you send the Webhook to the URL of your Twilio Function and it calls Studio)? Take a look at the example, Make a Write Request to an External API using urlencoded data, to better understand how to call the Studio Flow from the Twilio Function.

Alan
- 10,465
- 2
- 8
- 9
-
Thank you. I’ll go function route, I didn’t wanna mess with creating plugin for Wordpress and get twilit sdk involved. Because I just want simple text message when order is created, and since woo commerce already has webhook option on order events, I rather just hit url to trigger text message – Vishal Desai Mar 22 '21 at 01:39
-
so i used the hello world function to test, the url it gave me for function when i hit that url i get "Unauthorized - you are not authenticated to perform this request" error, what parameters do i need to pass to url to trigger hello world function ? – Vishal Desai Mar 22 '21 at 19:42
-
Set the Function to public (from protected)/deploy if you're using the new Twilio Functions UI or if using the classic UI, uncheck Verify Signature checkbox/save. This will allow the URL to be hit from the Internet. Since this is now a public URL, just make sure you put any necessary checks in place to protect against triggering from unauthorized parties. – Alan Mar 22 '21 at 23:07