Python-powered chat apps with Twilio and SendGrid Transcripts
Chapter: Course conclusion and review
Lecture: Review: Calling an API in Studio

Login or purchase this course to watch this video and the rest of the course contents.
0:00 That Flask API endpoint we created.
0:02 That was our end of the story.
0:04 But over in Twilio studio, we need to connect our flow over there back to
0:08 that API endpoint. In order to do that,
0:11 we did a couple of interesting things.
0:12 We added the make http request widget to our flow.
0:16 And we told it we're going to do a post request over to our URL of
0:20 type application/json. And then down here at the bottom,
0:24 we put all the information we want.
0:27 We've gathered up and we want to convey across to that end points with our customer
0:31 with the number, and name and email,
0:34 the cake with the topping and so on and even the price that we got from
0:37 that PricingAPI. The other thing of note here is that we're using
0:42 in ngrok. Remember, we did this all the way back to our Dev machine
0:46 and we were able to set a breakpoint in PyCharm or whatever editor you're using
0:51 set a breakpoint there and look at the code and inspected at this running as part
0:56 of studio calling over to our api endpoint.
0:59 That was super cool. How did that happen ngrock.
1:03 In my example, I had to paid account and I was able to use
1:05 cloudcity.ngrok.io.
1:07 But in practice, you probably have some random GUI looking thing there,
1:11 so make sure that's always up to date as you're working with your api and maybe
1:16 restarting in ngrock, and it changes.