Sentiment Analysis

फ्रीमियम
Verified
द्वारा Twinword API | अपडेट किया गया hace 20 días | Text Analysis
लोकप्रियता

9.6 / 10

लेटेंसी

224ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

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

Rapid account: Mansi 9931
mansi9931
hace 4 años

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 hace 4 años

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

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें