Base64-encoded HMAC-SHA256 signature?

Used the above script to encrypt the text, Can you give the code to decrypt the same. Im building a publically accessible DB table for searching

1 Like

Hey @prajnyabaliga3186, did you ever find a solution for this? I’m in need of the same functionality…

Hey @mike2

We recently built a similar plug-in for a client. We are happy to help you setup the same. If your interested please direct message me

It was pretty simple, when you upload an image in bubble, you have it’s base64 value available. Since it is a very big balue, you cannot see it in text form in the frontend, but can use in workflows.

Just in case anyone ever finds this post like I did looking for a way to encode a username + API key in base64 to send in an API call with Basic Auth. A big thanks to @miguel for the code. I’m not a javascripter at all so this was a massive help!

In my case, I didn’t need the sha256 encoding, just basic base64 encoding for Basic Auth. My code in the “Service Script” workflow step looks like this:

var base64 = Buffer.from("your_api_username:your_api_key").toString('base64');

base64;

Worked like a charm. Thanks again!

3 Likes

Bubble does have a server side function to sign SHA-256 and base64 encode it. If anyone is still looking for that solution.

IGNORE THE VALUES IN THE IMAGE.

4 Likes

Hey @FlipList , This looks great. My signature requires a “key” and a “value”, do you know how I would go about this?


Endpoint security type – Binance API Documentation (binance-docs.github.io)

I’ve been really stuck on this, as I’m not sure how to generate the signature. Will appreciate some help enormously.

Thanks

Hi @agoo7714 ,

I’m not familiar with this api.

check out this forum post, looks like they’re setting up a call that requires a signature…

1 Like

Hey pat, how did you manage to initialise the API if the timestamp is included in the signature string. My API returns an error if the signature is not correct.

1 Like

Hey @gilles , how did you read out the base64 value?
I would expect it to be available in the workflow as “Result from step X…” but when I do that I’m getting a 4-digit number that increases by 1 every time I try to pass a text.

@Jett

You can get the ‘result of’ previous workflow step from this plugin.

Screenshot 2022-02-05 8.11.13 AM

1 Like

Nice! Thanks.