Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (12.8k points)

 have the following problem:

In Workfusion Studio I have created a new bot task and have defined 2 vars:

<var-def name="tJSON">

  [{'Text':'ciao'}]

</var-def>

<var-def name="tLanguage">

        <http-extended url="https://api.cognitive.microsofttranslator.com/translate?api-version=3.0" method="POST" charset="UTF-8" content-type="application/json">

            <http-header-extended name="Ocp-Apim-Subscription-Key">83ffa3bd24bf4f75aa0814c3713bd0d4</http-header-extended>

            <http-param-extended name="to">en</http-param-extended>

             <var name="tJSON"/>

        </http-extended>    

</var-def>

 have the following response:

{"error":{"code":400036,"message":"The To field is required."}}

What is wrong with the http-param-extended in my definition, please, advice!

1 Answer

0 votes
by (29.8k points)

The API requires the 'to' parameter to be present in URL, rather than in the request body.
Can be done as follows:

<http-extended url="https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&amp;to=en" .

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...