Forum Academy Marketplace Showcase Pricing Features

API Help Needed (Can't access API body response in workflow if it begins with "true [ . . . ]")

So I’m building a plugin for a financial services API. I need to send two different calls to the API (createParty and createAccount), and save the ID’s from the response body to the User in Bubble.

The createAccount call works great: initializes properly, and all the data in the response shows up as available in workflow builders, so I can save the returned accountId to the User. Peachy. This is how a properly initialized createAccount call looks:

The createParty call doesn’t work so great: it initializes properly, but the API inserts a “true [ . . . ]” in front of the body of the response. Like this:

And Bubble just can’t seem to handle it. The API provider says “well, just ignore the “true” and use the rest of the response.” But if you do that when initializing the API call, NONE of the response body’s details are available in the dropdown in the workflows. Like this:

I mean, the two calls are structurally identical (PUT’s of almost identical data), so yes, it’s really strange that their API brackets the createParty response with a “true [ . . . ]”. But shouldn’t Bubble also be able to get past the “true [ . . . ]” and retrieve the body of the response itself?

Any help would be appreciated. Thanks!

SOLVED! Solved my own problem. Leaving it here in case anyone else runs into the same.

  1. Initialize the call as you normally would.
  2. Click “Show raw data” to reveal the complete response.
  3. DO NOT just hit Save.
  4. Copy the complete response, then hit Cancel to close the window without saving.
  5. Scroll to the bottom of the call and click on “Manually Enter API Response.” Don’t worry, it’s not as scary as it sounds.
  6. Paste the response you copied in #4.
  7. Remove the “true”, the opening bracket “[” and the closing bracket “]”, and delete all the extra spaces.
  8. NOW Save, and the response will work like it should.
1 Like