API Call JSON Body Parameter Not Recognizing []

I am using the API connector to setup an API call that provides for the option of sending through an array.

I have set things up properly as far as I can tell but keep getting the error message that the Body is not proper JSON formatting. I have tested the formatting and found it to be setup properly, which makes me believe for some reason the used in the input for the dynamic body parameter is not getting recognized.

I’ve used this same setup for various APIs and it has worked consistently.

In the Input for the workflow

Screen Shot 2021-10-10 at 6.29.11 PM

In the Format as Text

Screen Shot 2021-10-10 at 6.30.29 PM

In the Debugger

Debugger

In the Evaluator

Evaluator

In the JSON Formatter


Any ideas as to why the call reports invalid formatting? This is the error message from the call

“<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>300Request Body should be a valid JSON object.”

Even when I just send through the valid json formatting as a text in the input I get the same message

["attendees", {
"name" : "Matthew McGowan"
},"attendees", {
"name" : "Roger Dodger"
},"attendees", {
"name" : "Suzy Ques"
},"attendees", {
"name" : "Matthew Yahoo"
},"attendees", {
"name" : "NOT Member"
},"attendees", {
"name" : "TEst One"
},"attendees", {
"name" : "TEst Two"
}]

Screen Shot 2021-10-10 at 6.34.33 PM

I’m just guessing here but your array is not a typical Json array

You have an array that includes:

string
Json object
String
Json object
Etc

Shouldn’t there be a colon after attendees? Wanna share a link to the docs?

I would imagine to see something like

    Attendees:[
    {name:dhfhfjf},
    {name:tjtkt}
    ]

Thanks for the reply.

I tried that formatting and the error is persistent.

“<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>300Request Body should be a valid JSON object.”

Screen Shot 2021-10-10 at 11.35.32 PM

Putting it into the validator I am using it fails, and I think that I had attempted this formatting to begin with as it works in other API calls for lists. I had only changed it from this after checking the validator, and working through it on there, the way I used it and exemplified in this post it was considered valid from the online validator.

Im using this formatter

And I’m trying to push this through for this API call for Zoom

https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetinginvitelinkscreate

The way I read it, I would try something like

{
attendees[
   {
     "name": "Mike Brown"
   },
{
     "name": "Mike Brown"
   }
]
}

My reference above was incorrect.

Also, the docs make it loook like that goes on the payload body as text. So, not inputting the data as a form (key/value pairs) I could be wrong there.

^^^ should be correct

{
  "ttl": 3600,
  "attendees": [
    {
      "name": "Mike Brown"
    },

  {
      "name": "Mike Brown"
    },

  {
      "name": "Mike Brown"
    }

  ]
}
1 Like

Winner winner chicken dinner.

This works.

Seems like the only thing that was actually missing before were quotes around attendees.

Thanks for the help! JSON is a Nightmare on Elm Street.

1 Like

Yep. It’s weird depending on the environment. In some, the keys don’t need quotations. Sometimes it’s just trial and error. Sometimes the providers will be specific.

Nice work getting it solved!!

This topic was automatically closed after 14 days. New replies are no longer allowed.