Text Analysis

GRATUIT
Par Bhavya Gaur | Mise à jour לפני 4 ימים | Text Analysis
Popularité

9.8 / 10

Latence

393ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

"validation error, incorrect data passed to the server"

Rapid account: Discoverearth
discoverearth
לפני שנתיים

I’ve used the sample parameters for summarize-text, but I get the error in the title:

var options = {
method: ‘POST’,
url: ‘https://text-analysis12.p.rapidapi.com/summarize-text/api/v1.1’,
headers: {
‘content-type’: ‘application/json’,
‘x-rapidapi-host’: ‘text-analysis12.p.rapidapi.com’,
‘x-rapidapi-key’: ‘…’
},
data: {
language: ‘english’,
summary_percent: 10,
text: 'I believe that it is fundamental to have an overview of the history the…"

Rapid account: Daivalin HY Lb 2 ZTM XF
daivalin-HYLb2ZTM_XF Commented לפני שנתיים

Use Array first and then convert it into json like below:

$post_fields = array (
‘language’ => ‘english’,
‘text’ => validated[inputtext]);validated['input_text']); post_fields = json_encode($post_fields);

It works for me.

Rapid account: Gaurmanojkumar 530
gaurmanojkumar530 Commented לפני שנתיים

I can also send you the postman snapshot if you like.

Rapid account: Gaurmanojkumar 530
gaurmanojkumar530 Commented לפני שנתיים

I understood the issue. Your body type is set to “Body type: x_www_form_urlencoded” this is incorrect.
Summarize text endpoint consumes JSON body.
I have no idea about how Integromat works but you need to pass JSON contents in the body.
Your headers must also contain “content-type”: “application/json”

Rapid account: Discoverearth
discoverearth Commented לפני שנתיים

Everything works in the RapidAPI console.

But in the environment I’m using (HTTP 'Make a request module in Integromat)

  • extract-text-from-files works.
  • But summarize-text gives the “validation error, incorrect data passed to the server” error.

These are the screenshots from the module. This may be outside of your expertise, but still Integromat is very popular… do you have any ideas on why this error is happening…?

The (Long String) is the sample text, copied and pasted from the summarize-text code snippet.
and

Rapid account: Gaurmanojkumar 530
gaurmanojkumar530 Commented לפני שנתיים

Could you describe your problem in more detail?
And also provide the source code.

Did you get this error while trying out in the RapidAPI console?
If yes simply refresh your browser and try again.

If you got this error while using nodejs or any other language/framework.
Prefer to use Postman’s auto-code generation (RapidAPI’s auto-code generation doesn’t
always work correctly)

If you have any more queries please feel free to ask them.
(But please create a new comment instead of replying here so
that I get notified. RapidAPI only notifies me of root comments)

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires