mere-teal
mere-teal16mo ago

Trying to make a request to the interact endpoint to trigger an intent but getting an error

I tried making a request to the interact endpoint using the following: curl --request POST \ --url https://general-runtime.voiceflow.com/state/user/joe/interact \ --header 'Authorization: xxxxxxxxxxx' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header 'versionID: 661d0e43c1d4e9c497821700' \ --data ' { "action": { "payload": { "intent": { "name": "TEST" }, "query": "intent test for ethan" } } } ' And i got this error: { "code": 500, "status": "Internal Server Error", "dateTime": "2024-05-27T15:24:43.053Z", "timestamp": 1716823483053, "data": "Cannot read properties of undefined (reading 'startsWith')" } Please help me solve this
1 Reply
robust-apricot
robust-apricot16mo ago
Hi @Ethan It looks like the error you're encountering is due to an issue in your request payload or the server configuration. Try this curl --request POST \ --url https://general-runtime.voiceflow.com/state/user/joe/interact \ --header 'Authorization: xxxxxxxxxxx' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header 'versionID: 661d0e43c1d4e9c497821700' \ --data ' { "action": { "type": "text", "payload": { "query": "intent test for ethan", "intent": { "name": "TEST" } } } } '

Did you find this page helpful?