fascinating-indigo•2y ago
Interactions in the Dashboard is different from the response of REST API endpoint
I want to integrate Voiceflow into my Flutter app through the use of REST API, but I am having issues with the different responses coming from the API response.
I want to achieve the exact chat flow (in terms of options given as responses to questions) in my app, as it is in the Dashboard.
The full URL I am using is https://general-runtime.voiceflow.com/state/user/$userId/interact
In the response, I am checking for the element where
element['type'] == "text", in which I will show to the user as the response of the bot.
And using, element['type'] == "choice" to get the choices given in the response
Now, the issue is that the choices I am getting from actualChoices['payload']['buttons'] is more like a default choice, and not the choice set for each question.
The point is that I need help understanding the API responses well, so that I can use the understanding to build my app, and hopefully build a package for Flutter apps.
Thank you.2 Replies
absent-sapphire•2y ago
@Jeremiah Erinola Have you played with the Fetch state action much? https://developer.voiceflow.com/reference/getstate-1 It's been really helpful to compare the current state of the assistant to the results I'm expecting.
fascinating-indigoOP•2y ago
I just got to know that there are different kinds of requests, and they are not the same. I was sending the same thing. That was the reason.
So there are different kinds of requests that have different bodies: [intent, text, launch]