Search code examples
twiliotwilio-apitwilio-php

Trying to Retrieve data from Twilio Studio Flow Rest API?


I am trying to send data from Postman to Twilio studio Flow RestAPI. The request has the basic authentication and set data in variables Params. The variables I am passing are To, From, and body. The image of the request is attached here to clarify what I am trying to request.

PostMan Requeset is attached

I had read the documentation and found that flow.data.(any_variabe) can access the data passed to the API but it's not working.

enter image description here

I am not clear what I am missing but assuming that the data as parameters are not passing from the request to twilio. Can you please guide me where I am doing wrong. The log flow is

enter image description here

I am a newbie to Twilio Studio Flow Rest API. If I had missed some information to inform you about the case please ask I will elaborate it further.


Solution

  • View the document here.

    curl -X POST https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions \
    --data-urlencode "To=+13105555555" \
    --data-urlencode "From=+12125551234" \
    --data-urlencode "Parameters={\"patient\":\"Jon\",\"time\":\"8AM\"}" \
    -u "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token"
    

    enter image description here