Language Interpretation error 400

Description
Following https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate I can create a meeting with Language Interpretation enabled using the following data in the request body (snippet provided):

[settings] => Array
        (
            [language_interpretation] => Array
                (
                    [enable] => 1
                )
        )

I am using a Business license with Interpretation enabled and this works fine. In the meeting as Host I can then add interpreters and languages.

I want to add these via the API so I can cut out a manual process. If I use:

[settings] => Array
        (
                (
                    [enable] => 1
                    [interpreters] => Array
                        (
                            [email] => email@example.com
                            [languages] => en,de
                        )

                )

        )

I get a HTTP Status Code 400, with no Error Code.

The email address is a real email address of a zoom user. Iā€™ve tried the languages in upper and lower case.

Error
Iā€™m calling the API via PHP. Here is the exception response data:

GuzzleHttp\Psr7\Response Object
(
    [reasonPhrase:GuzzleHttp\Psr7\Response:private] => Bad Request
    [statusCode:GuzzleHttp\Psr7\Response:private] => 400
    [headers:GuzzleHttp\Psr7\Response:private] => Array
        (
            [Date] => Array
                (
                    [0] => Sat, 14 Aug 2021 07:38:30 GMT
                )

            [Content-Type] => Array
                (
                    [0] => application/xml;charset=UTF-8
                )

            [Content-Length] => Array
                (
                    [0] => 148
                )

            [Connection] => Array
                (
                    [0] => keep-alive
                )

            [x-zm-trackingid] => Array
                (
                    [0] => v=2.0;clid=aw1;rid=WEB_e14bda6806450848716821a57f0aeb27
                )

            [X-Content-Type-Options] => Array
                (
                    [0] => nosniff
                )

            [Cache-Control] => Array
                (
                    [0] => no-cache, no-store, must-revalidate, no-transform
                )

            [Pragma] => Array
                (
                    [0] => no-cache
                )

            [Expires] => Array
                (
                    [0] => Thu, 01 Jan 1970 00:00:00 GMT
                )

            [Set-Cookie] => Array
                (
                    [0] => zm_aid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
                    [1] => zm_haid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
                    [2] => web_zak=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
                    [3] => cred=7B79D84C6D278D4A1B34A5A35792378C; Path=/; Secure; HttpOnly
                    [4] => _zm_ctaid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
                    [5] => _zm_chtaid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
                )

            [Vary] => Array
                (
                    [0] => Origin
                    [1] => Access-Control-Request-Method
                    [2] => Access-Control-Request-Headers
                )

            [X-RateLimit-Category] => Array
                (
                    [0] => Light
                )

        )

    [headerNames:GuzzleHttp\Psr7\Response:private] => Array
        (
            [date] => Date
            [content-type] => Content-Type
            [content-length] => Content-Length
            [connection] => Connection
            [x-zm-trackingid] => x-zm-trackingid
            [x-content-type-options] => X-Content-Type-Options
            [cache-control] => Cache-Control
            [pragma] => Pragma
            [expires] => Expires
            [set-cookie] => Set-Cookie
            [vary] => Vary
            [x-ratelimit-category] => X-RateLimit-Category
        )

    [protocol:GuzzleHttp\Psr7\Response:private] => 1.1
    [stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object
        (
            [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #11
            [size:GuzzleHttp\Psr7\Stream:private] => 148
            [seekable:GuzzleHttp\Psr7\Stream:private] => 1
            [readable:GuzzleHttp\Psr7\Stream:private] => 1
            [writable:GuzzleHttp\Psr7\Stream:private] => 1
            [uri:GuzzleHttp\Psr7\Stream:private] => php://temp
            [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array
                (
                )

        )

)

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT

Which Endpoint/s?

Hey @matt_b,

Thank you for reaching out to the Zoom Developer Forum. First, I would make sure that you are sending that data in the request body as JSON. If thatā€™s the case, please share the JSON body that you are sending with this request and Iā€™ll check for any issues there.

From what I can tell here, it seems to be formatted correctly.

Thanks,
Max

Hi Max

Thanks for getting back to me. So Iā€™m doing this in PHP using Guzzle, which automatically converts PHP arrays (as per my previous post) to json. However I inserted a line to encode the array in JSON to output it in this format, which will be the same used in the guzzle request:

{
   "topic":"Test Zoom Integration",
   "agenda":"This is a test Zoom Meeting using language interpretation",
   "start_time":"2021-08-18T05:48:24Z",
   "duration":1439,
   "type":2,
   "password":"GxI1dM7tOF",
   "settings":{
      "host_video":true,
      "participant_video":true,
      "auto_recording":"disabled",
      "mute_upon_entry":false,
      "audio":"both",
      "approval_type":2,
      "waiting_room":false,
      "language_interpretation":{
         "enable":true,
         "interpreters":{
            "email":"email@example.com",
            "languages":"en,de"
         }
      }
   }
}

Posting this without the ā€œinterpretersā€ entry works fine.

@MaxM any updates on this please? Any issues with the JSON Iā€™m using?

So I replicated this in Postman. I get the following returned:

<error>
    <code>300</code>
    <message>Request Body should be a valid JSON object.</message>
</error>

However if I put the JSON through three different online JSON validators and they area all confirming it is valid JSON. Please tell me where the typo is because I just cannot see it.

@matt_b Sorry for the delay here. I noticed that you are using the country code ā€œENā€ which doesnā€™t exist in list of country codes. Try using ā€œUSā€ or ā€œGBā€ for English.

@getforfashion Please share the request you are using when you see this issue.

Max

Thanks @MaxM

I still get the same error both in PHP and Postman. 300 ā€œRequest should be a valid JSON object.ā€

This is off topic but why are country IDs being used for languages? In the Unitied Kingdom of Great Britain and Northern Ireland we have 14 indiginous languages - see Languages of the United Kingdom - Wikipedia. So which of those languages is being specified by the country code ā€œGBā€? My organisation has been working with Iranian refugees who speak Farsi. We use Zoom for translation with professional Farsi translators. Why is Iran not in the list of countries specified by Zoom? Why is Farsi not in the list of languages? These places and languages do all existā€¦ Zoom should use the ISO standard lists not imposing their own (see ISO 3166-1 - Wikipedia and List of ISO 639-1 codes - Wikipedia. And just for fun please also include Klingon, Bocce and Pirate :smiley:.

On the UI you can specify anything as a language - it is not restricted to those lists so Iā€™ve specified Farsi and Welsh as default languages to choose from.

Iā€™d assumed it didnā€™t matter what was in the string as long as it was separated by a comma?

Either way, the Zoom API is still throwing a JSON validation error on valid JSON.

Same error with ā€œUS,CNā€ as we well.

Hey @matt_b,

Thank you for your feedback on using the Country Codes, I agree. If you would like to see this changed, I recommend submitting a topic in our #feature-requests category. Iā€™ll talk with our team tomorrow too.

When it comes to your request, Iā€™m really not seeing any issue. As youā€™re seeing an XML response Iā€™m wondering if you are using a Content-Type that isnā€™t application/json?

If thatā€™s not the case, please send an email to developersupport@zoom.us with a link to this thread. In that email, please include the app name and app owner email where this is happening. Iā€™ll work to reproduce the issue and engage our engineering team.

Thanks,
Max

Thanks @MaxM

Iā€™ll look into a feature-request for my aside on Country Codes, but my priority is to get this working first.

I am using ā€˜application/jsonā€™ as the Content-Type - if I remove the ā€˜interpretersā€™ value from the JSON I can create a meeting as expected (with Language Interpretation enabled, just no intepreters added to the meeting).

Iā€™ll email developersupport.

kind regards
Matt

Just to follow up, the issue was I was sending the interpreters as an object whenā€‹ it should be an array of objects.

Should be:

"language_interpretation" : {
  "enable" : true,
  "interpreters" : [
    {
      "email" : "email@example.com",
      "languages" : "US, CN"
    }
  ]
}
1 Like

Hey @matt_b,

Good catch, my apologies for not noticing that earlier. I talked with my team about the Country Codes and I think a feature request detailing your issues would be a good next step. Please link it here if you do create one.

Thanks,
Max

I didnā€™t spot it either, it was so obvious! Feature request: /users/{userId}/meetings - use languages for language interpretation

Hey @matt_b,

Thank you for submitting your request!

Thanks,
Max