Is there a way to see the raw JSON being sent through the API connector?
When I test my connection out in API connector, it works fine, but it fails with a ‘error: invalid json input’. when I run the workflow. The service I’m connecting to doesn’t have any raw logs (I’ve emailed them about it…).
All I see in debugger and the logs is the parameters and values, which all looks correct.
I have the same need this morning, this is what i did.
i created a custom workflow, with a parameter as text,
then when i call my API, on next step i call that dummy custom workflow and pass the Result of API call into it.
Now when i preview the page with debug mode and step by step, i can see the custom workflow and see what data is being pass.
When I call that from a workflow, the 3rd party service returns “error: invalid json”
I can’t see what JSON bubble is sending out so I can validate it and figure out if it’s their service (which actually sucks, I don’t know why I still use them…) or what I’m sending. The 3rd party doesn’t have logs or a console where I can see what they’re receiving.
requestbin is a good tool to inspect. Just need to modify the url you have and send the request to bin. Better to do it from API connector ad after from workflow. So you can compare both.
In that case, most likely your input(s) include character(s) that screw up the JSON. It could be quotation marks… Paste your JSON body with your input that breaks the code in JSON Validator and you’ll see what’s wrong. Hope this helps