Perspective API


I’m trying yo use the Google Perspective API in a Knime flow.

Here there is an example of a simple request

$ curl -H “Content-Type: application/json” --data
‘{comment: {text: “what kind of idiot name is foo?”},
languages: [“en”],
requestedAttributes: {TOXICITY:{}} }’

I tried to use the POST Request Node with the following parameters:

and url

I get an error

ERROR POST Request 3:126:140 Execute failed: Wrong status: 400 Bad Request

any idea why it is not working?


just to make sure: You used a proper API key in the URL and not the placeholder “YOUR_KEY_HERE” when you made the request, correct? Otherwise you will first need to acquire an API key to authenticate your requests with.
Kind regards,

Yes! I just didn’t want to write my key here in a public forum.

I get a key from the Google developers site.



OK, perfect. Did you get any response back from the API? Any error messages in the body column?
Kind regards,

It works!

It checked the body column and the error was the API key, because it was created but not activated.

So, it was my fault.

Thanks for your help!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.