How to see json being sent through API connector

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.

I do the same thing for seeing the results of my call, I just can’t see what is being SENT from Bubble.

Sorry, can you elaborate on your situation further?

I setup an api connector to a 3rd party service.

When I initialize it in Bubble, it works fine.

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.

2 Likes

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.

1 Like

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 :v:


@bestbubbledev - Youtube | Patreon | LinkedIn | Twitter

Unreal. A trailing space in a string I’m passing to the 3rd party API was causing the problem.

Request Bin was the solution but for good measure, Bubble support said you could find the payload in Chrome inspector as well:

  1. right-click: inspect
  2. click the ‘network tab’ make sure network traffic is being recorded
  3. invoke the workflow and there should be a ‘doapicall’ in the list

updated:

Bubble support also said you can see in the Server Logs by clicking ‘advanced’ and selecting HTTP Request and HTTP Response.

2 Likes

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