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?
Aşağıya yorum ekleyerek tartışmaya katılın:
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