Hi, I am new to Feathery and am currently trying to connect my Feathery account to my CRM API.
I am hitting a compatibility roadblock I cannot sort out.
My CRM API requires to first generate an API key passing a client_id and client_secret and then responds with a toke for future requests.
According to the CRM API documentation I need pass the client ID and secret with the body formatted as ‘multipart/form-data’. However, Feathery only allows API integrations to be passed in JSON format from the API connector and if I try so I am getting a 400 Bad Request response.
Using a logic rule works to retrieve API keys but these end up exposed and hence would be a security breach.
Is there any way to pass data through the API connector as multipart/form-data, or as raw data? Otherwise, would there be a way to avoid the returned API key to be exposed when using a logic rule and storing it directly in a hidden field (this sounds more unlikely).
Thanks Peter. I am still getting an error though. I contacted the API developers also to see if they can provide some help, but it seems that the API is still expecting the data in a different format.
Here are two tests I ran on the different way that the body gets formatted for ‘multipart/form-data’ content:
This is the request to the API that returns the error, and how the API connector is sending the content:
This seems to be how the API is expecting the data and would have been a successful request. (Sent this via postman, where it encodes form values in a structured manner):
Any way that I can pass the data like in the second request?
It seems that it is passing the same minus the “filename=” part, but not actually parsing it as form values. Could it be related to the fact that on the header it is not passing the boundary to identify each part?
Not sure if this is a flaw on the API itself that cannot parse this request body and extract the values of “client_id” and “client_secret” from it. Just in case, this is the API endpoint I am trying to pass the data to:
This seems to be almost there but there is a minor issue with the encoding of the values.
The encoding seems to be passing the quotes of the values from the JSON body. So the API is rejecting the values because instead of parsing 7021 as a client idea it is parsing “7021”