Sentiment Analysis

FREEMIUM
Verified
От Twinword API | Обновлено 4 giorni fa | Text Analysis
Популярность

9.7 / 10

Задержка

161ms

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

100%

Health Check

N/A

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

Keep getting {'result_code': '415', 'result_msg': 'Does not look like a valid request'}

Rapid account: Mansi 9931
mansi9931
4 anni fa

Hi, here is my python code:
body = “text=” + text
url = “https://api.twinword.com/api/v4/sentiment/analyze/

headers = {
“Content-Type” : “application/json”,
“Host” : app_config.AWS_PRO_API_HOST,
“X-Twaip-Key” : app_config.AWS_PRO_SUBSCRIPTION_KEY
}

response = requests.request(“POST”, url, data=body, headers=headers)

response = json.loads(response.text)

This gives me the error: {‘result_code’: ‘415’, ‘result_msg’: ‘Does not look like a valid request’}

I am not using “params=body” as I have a long body of text to analyse so I get error 414 (too long URL)

Twinword, in an email, told me that I can send text within 75,000 characters. So how do I resolve this?

Rapid account: Twinword
twinword Commented 4 anni fa

Hi Mansi9931, thank you for using Twinword API! Unfortunately, we can’t help you with coding issues. However, in case you haven’t noticed, RapidAPI provides you with a code input sample that might be helpful. Please check the code snippet box at the bottom right, under the ‘Endpoints’ tab. You can choose the code type accordingly.

I hope this helps!

Best,
Team Twinword

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

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