Sentiment Analysis

ÜCRETSİZ PREMIUM
Verified
Taraf Twinword API | Güncelleyen 8 दिन पहले | Text Analysis
Popülerlik

9.6 / 10

Gecikme

227ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

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

Rapid account: Mansi 9931
mansi9931
4 वर्ष पहले

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 वर्ष पहले

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

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun