Emotion Analysis

FREEMIUM
От Twinword API | Обновлено 12 days ago | Text Analysis
Популярность

9.4 / 10

Задержка

1,658ms

Уровень обслуживания

100%

Health Check

N/A

Назад ко всем обсуждениям

Getting Error : {"result_code":"415","result_msg":"Does not look like a valid request"}

Rapid account: Mobinet Media
MobinetMedia
4 years ago

i am using below code
fetch(“https://twinword-emotion-analysis-v1.p.rapidapi.com/analyze/”, {
“method”: “POST”,
“headers”: {
“x-rapidapi-host”: “twinword-emotion-analysis-v1.p.rapidapi.com”,
“x-rapidapi-key”: “76b37ef4e6msh7447752c63ca90dp19104ejsn87424c7e3b6f”,
“content-type”: “application/x-www-form-urlencoded”
},
“body”: {
“text”: “After living abroad for such a long time, seeing my family was the best present I could have ever wished for.”
}
})
.then(response => response.json())
.then(data => {
console.log(data);
var result = JSON.stringify(data)
document.getElementById(“display_result”).value = result;
})
.catch(err => {
console.log(err);
document.getElementById(“display_result”).value = err;
});

but i am getting a response :
{“result_code”:“415”,“result_msg”:“Does not look like a valid request”}

please help me where is issue in my code.

Rapid account: Meredythp
meredythp Commented 4 years ago

did you ever figure this out? I am also having this issue

Rapid account: Twinword
twinword Commented 4 years ago

Hi MobinetMedia,

Thank you for using Twinword API! Unfortunately, we aren’t able to help you with your code. However, you can find coding snippets here on RapidAPI: https://rapidapi.com/twinword/api/emotion-analysis/endpoints

On the lower right side is a code snippet box where you can select the coding language.

We hope that helps!

Best regards,
Team Twinword

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии