Hey everyone,
This call works fine in Postman formatted per the API documentation from Monkey learn. I also have it working via the Blockspring connector, but really would like to remove that step if possible.
I repeatedly get an error on the format of the text_list parameter when using the Bubble API connector.
Here is the info from the Monkey Learn API doc:
curl --data ‘{“text_list”: [“some text to test”, “some more text”]}’
-H “Authorization:Token 0b38743f3…”
-H “Content-Type: application/json”
-D - https://api.monkeylearn.com/v2/classifiers/cl_oFKL5wft/classify/
Have you tried Content-Type: application/json instead of multipart/form-data ?
Usually the authorization header would be setup with the parent API Authentication key, should still work though.
The “text_list” should be in the JSON body, not in a query string.
You’re no longer getting the error for expecting a list of items, so its progress.
Looks like the parameter is still active, if you don’t see it in the API call, try recreate the API call. Sometimes the API connector doesn’t delete things correctly.
Or refresh the app editor after making changes to the API connector.
Although Bubble didn’t like the results for me, probably too many nested lists. Can change the Data type to Text, and parse the result yourself, especially if its just one set of results.
Mishav,
Thanks for your help. I tried the call as you show above and it worked for the sandbox, but not the live version. Finally occurred to me that maybe the url needed to end with the / after classify.
I added that to the end and it worked.
However, I’m having the same problem you mentioned with Bubble not handling the results.