Skip to main content

How to do a request with JSON that has form data as content type or how you can do a request with JSON inside a form data parameter??

I am trying to make a Custom Post Request in Webhooks by Zapier, where we have the data written in JSON format, the JSON object has parameters such as URL, method, headers, params and body which has all attributes, we have content-type as form data in the headers. When we try to Test, we always get an error as follows: 

message: Invalid organization key

messageType: Error

What can be the problem and what is the solution?

Hi @khaledeissa12!

Off the top of my head an error like ‘Invalid organization key’ suggests that there’s an issue with the authorization for the webhook. Have you tired testing the webhook in an app like Postman? That would be one way to check whether the hook was configured to send the correct authorization. I hope that helps!


Hi @Danvers 

We have the request body as follows:

 

const options = { url: '',

method: '',

headers: {

'Content-Type': '',

'Accept': '',

'AccessKey': ''

},

params: {

'secureKey': ''

},

body: {

'username': 'Alex',

}

 

, This means that the header or the params are not read?, how can we solve such an issue?

And also how is it possible to script JSON inside a form-data parameter?