How do I make an HTTP request using form data in the body instead of json?
Our HTTP API integration is specifically designed to work with JSON-formatted data in the request body. The Content-Type is always set to "application/json".When sending data, you'll need to structure it as JSON with proper formatting:** Use quotes around string values ** Leave numbers and booleans without quotes * Format as key-value pairsFor example::LBKSLBKS```LBKS{ "email":: "sam@clay.com", "name": "Sam" }```If you need to work with form data, you'll need to convert it to JSON format first before making the request through our API integration. Sources: HTTP API - Clay University HTTP API integration overview | Clay University HTTP API with Clay
This won't work
I apologize for the inconvenience; could you please provide more details about what isn't working so we can better assist you?
I need to use form data in an HTTP request
Looks like you're still looking for help. We're escalating this over to our support team and someone should be in touch soon. In the meantime, feel free to include any other information that may be helpful in solving your issue!
Hi Mathew, thanks for reaching out! Could you elaborate on the form data you're looking to use in your HTTP request? The body does need to be in JSON but happy to see if there's a workaround we can apply here
I'm trying to make an Oauth2 request which request form data instead of JSON
is there a way to circumvent the JSON requirement?
I've tried overriding the header with Content-Type: application/x-www-form-urlencoded but doesn't work
Do you mind sending the link to the table so we can take a look? https://downloads.intercomcdn.com/i/o/1171717996/ac7729f84b426e1d0358af02/image.png?expires=1733777100&signature=328ac0767dca85fd2223357694fa3922acf0c04eb5e3c3e476258b15b38aebea&req=dSEgF85%2FmohWX%2FMW1HO4zYTywSj7AZAX2BKsam%2FhVPvMYQ%3D%3D%0A
It's the DealCloud Token column
Thanks Mathew! Our HTTP API integration is specifically designed to work with JSON-formatted data in the request body. The Content-Type is always set to application/json and it's not possible to change this
Got it -- so if the API requires form data you cannot interact with it in clay
That's correct Mathew
However, there's actually a workaround you can apply here by sending data from Clay to an intermediary tool like Zapier or Make.com. These tools can transform a JSON body into a form-data payload and forward it to the target API. Here's a quick guide on how to send your Clay table data to Zapier with HTTP API: https://docs.clay.com/en/articles/9726528-guide-how-to-send-your-clay-table-data-to-zapier-with-http-api Feel free to give this a try and let me know if you need further assistance with your set up!
This thread was picked up by our in-app web widget and will no longer sync to Slack. If you are the original poster, you can continue this conversation by logging into https://app.clay.com and clicking "Support" in the sidebar. If you're not the original poster and require help from support, please post in 02 Support.