Quotation marks failed api call
Hey guys I encountered silly little error in my chatbot. Whenever my input has quotation marks in it, my API call to KB fails and no output is given. Anyone knows how to fix it?
1 Reply
The KB endpoint expects a valid JSON body. When the text you pass in still contains the raw “ double quote ” character, the JSON becomes malformed (everything after the quote is treated as outside the string) and the request is rejected – so the step silently follows the failure path and nothing is returned.
Fix
1. Escape/encode the user’s message before you drop it into the API body.
Then reference
"{safe_query}"
in the Raw Body field of your API step.
2. (or) Replace quotes manually:
3. Double-check you’re using straight quotes in the body, not curly quotes – curly quotes (“ ”) are not valid JSON and will break the request (see Troubleshooting Tips in the docs).
After escaping, the JSON sent to the KB will stay well-formed and the call will succeed even when the user includes quotation marks in their message.
Docs: https://docs.voiceflow.com → API step → “Testing & Troubleshooting” section (invalid JSON / hidden characters).