Text Analysis

無料
よって Bhavya Gaur | 更新済み il y a 9 jours | Text Analysis
人気

9.8 / 10

レイテンシー

323ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

"validation error, incorrect data passed to the server"

Rapid account: Discoverearth
discoverearth
il y a 2 ans

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 il y a 2 ans

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 il y a 2 ans

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

Rapid account: Gaurmanojkumar 530
gaurmanojkumar530 Commented il y a 2 ans

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 il y a 2 ans

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 il y a 2 ans

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)

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿