[SOLVED] API -> Curl, Node, Java with API Connector

Hello Bubble Expert (because this one is never easy):
Most API seem to give many option of language to be integrated. The simple one is Curl here.

  1. What is the best (or easy one) language to implement in Bubble API Connector?

  2. CURL

  3. Node.js

  4. How to make it work with API Connector? I passed many hour just guessing…

and you probably know the error message…:

Any way to go step by step?

curl is a command line thing. Like Postman for people that do coding stuff :slight_smile:

You can’t put that into the body of the API (although Blockspring did provide a way to “curlAnything” but I could never get it to work and I ain’t paying for it now).

It is very frustrating when API providers just throw a bunch of language implementations at you.

However … cho had sorted the API for plivio here …

You are going to have to think about how that callback url works.

2 Likes

We have found the process… After 8 hours. Thanks for your help @NigelG

1 Like

Any update on this @JohnM? :slight_smile:

One thing: sometime, you have to convert (decode) from or to Base64 the authorization key and Id key
(see http://base64decode.net) to find out it was the problem about credentials.
That’s why this forum is very important for everyone: How to not spent 8 hours for a 5 minutes solution!

2 Likes

Thanks for that.

You mentioned you would post a workflow. Could you do a Twilio/API Connector workflow for us?

Hi, I have a similar question. Which one will work best? Thanks.

It’s a shippo API call

@SEmvp - You’re best off taking look at Curl. Shippo gives this as a transaction example:

curl https://api.goshippo.com/transactions/70ae8117ee1749e393f249d5b77c45e0 \
    -H "Authorization: ShippoToken <API_TOKEN>"

In Bubble it would look like this:

Just replace “somerandomtransaction” with your desired transaction number (or enter dynamically in a a workflow), and <API_TOKEN> with the API token that shippo provides.

In general, it’s a good rule of thumb to try the call out with Postman first, and then copy/paste into the API Connector when it works correctly.

2 Likes

How would this work with API versioning? I need to add something like this in the curl:

-H “Shippo-API-Verions:1.0”

I can get this to work in Postman by importing raw text:

BUT I’m not sure how to do the same thing in Bubble…

Would it not be a second header value in the bubble api connector? You’ll have one for the Authorization, and another for key SHIPPO-API-VERSION with value 1.0.

–Ken

I would have thought so, but this is the error I get: