rising-crimson•2y ago
Valid API endpoint in postman returns 400 error in VF
We're trying to get an auth token from an API endpoint.
1 Reply
Based on the information you've provided, it seems like you're encountering a 400 error when trying to get an auth token from an API endpoint in Voiceflow. This error typically indicates a bad request, which means there might be an issue with the way you're making the request.
In Voiceflow, you can request an access token using an API step. Once the permissions are approved, you can use the "POST" method and paste in the URL for the token. In the headers section of the post request, add "content-type" with "application/x-www-form-urlencoded". In the body section of the post request, set the format as "raw" and paste in the necessary information, replacing {client_id} and {client_secret} with the values you obtained earlier. In the capture response section of the post request, specify that you want to save 'response.access_token" from the request response and save it to a variable called {access_token}.
If you're still encountering issues, it might be helpful to double-check the details of your request. Make sure the URL, headers, and body of the request are correctly formatted and contain the right information. Also, ensure that you've correctly replaced {client_id} and {client_secret} with the appropriate values.
For more detailed information, you can refer to this document on how to use the API step in Voiceflow.