wit-ai / wit

Natural Language Interface for apps and devices
https://wit.ai/
942 stars 91 forks source link

POST /utterances fails without obvious reason #2731

Closed castdrian closed 4 months ago

castdrian commented 4 months ago

Do you want to request a feature, report a bug, or ask a question about wit? report an issue

What is the current behavior?

curl -XPOST 'https://api.wit.ai/utterances' \
 -H "Authorization: Bearer ***" \
 -H "Content-Type: application/json" \
 -d '[{"text":"test lol","intent":"vc_mobile","entities":[],"traits":[]}]’

returns

{"error":"Bad auth, check token\/params","code":"bad-request"}

Which is neither useful nor error standard. The request body is built according to the documentation and the token is correct.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. run the above curl command, providing a valid api token and existing intent

What is the expected behavior? the request should succeed and the application should train the utterance to the provided intent

If applicable, what is the App ID where you are experiencing this issue? If you do not provide this, we cannot help. 748238623724119

castdrian commented 4 months ago

@ramh @patapizza @oliviervaussy @nausicaasnow It’d be great if any of you would actually care to maintain your org, your repos and your software.

castdrian commented 4 months ago

Turns out this endpoint requires the server token not the client token which is not documented anywhere.