Profanity & Toxicity Detection for User-Generated Content

FREEMIUM
Durch CognitiveAPIs | Aktualisiert il y a un an | Text Analysis
Popularität

8 / 10

Latenz

392ms

Service Level

100%

Health Check

N/A

Zurück zu allen Diskussionen

Cannot get it to work

Rapid account: Travbrad
travbrad
il y a 3 ans

Hello,

I’m really not able to get this API to work. I’ve copied the request from the example and I always seem to get this result:

error: “INPUT POST text, title, positives, negatives are empty”

I’m running a basic type script http post:

`let data = new FormData();
data.append(
‘text’,
‘You idiot! I will find where you live and kick you ass!’
);

let headers = new HttpHeaders({
  'content-type': 'application/x-www-form-urlencoded',
  'x-rapidapi-key': '42ccdd7f41msh80a38d28062bbc9p163f70jsn4cabbf4a5744',
  'x-rapidapi-host':
    'profanity-toxicity-detection-for-user-generated-content.p.rapidapi.com',
});


return this.http.post('https://profanity-toxicity-detection-for-user-generated-content.p.rapidapi.com/', data, { headers: headers})

}`

Rapid account: Unicorn NLP
unicornNLP Commented il y a 3 ans

another thought: is x-rapidapi-key valid?

Rapid account: Unicorn NLP
unicornNLP Commented il y a 3 ans

Hello,
the problem is that API is giving back message that all the input fields are empty. So I am guessing there is some problem with defining or sending the ‘text’ variable.
I do not know what is the exact syntax of the code that you pasted but shouldn’t there be ‘text‘:‘You idiot! I will find where you live and kick you ass!’ (so : instead of coma) or some other definition of the ‘text’ variable?
I am online for the next 8 hours so please write how it goes and did it resolve anything.
Best,
Tom

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen