Base64 decoding

I’m getting an error saying the header CB-ACCESS-SIGN is incorrect. Not sure if it’s within the Encode/DecodeA’s Output or a mismatch between the Encode/Decode A’s timestamp time and the timestamp time I’m setting in CB-ACCESS-TIMESTAMP. Is it possible to pull the timestamp you used from Encode/Decode A?

Here’s the error

Here’s the 1st step in the workflow performing the encode/decode. Which I hope is decode the secret before combining and encoding.

Here’s the 2nd step that’s using the value from the 1st step within the ‘List to run on’ parameter

Here’s the list showing the Encode/Decode Output in the CB-ACCESS-SIGN parameter. I’m thinking I need to have another “encode/Decode A’s Output’s timestamp” in the last paramter “CB-ACCESS-TIMESTAMP” instead of what I currently have in there “Current date/time:extractUNIXms”
image

@Kfawcett even if you try to sign a message and then encode it on base64, how do you plan to send it to GDAX to place an order (or in your case, to get the account info)? The thing is I don’t find a way to send the signed message to GDAX, apart from using e.g. NodeJS and the GitHub code available here: https://github.com/coinbase/gdax-node

I’ve even tried using webtask.io to run the NodeJS code there, but I’m having problems requesting the GDAX module… A big pain in the ass if you want to connect to GDAX!

I’ve setup an API and will pass the values into it once they’re complete. I’m able to manually compile them to get the API setup, but now I need to pass the user’s values dynamically after decoding the secret, concatenating, and then encoding.

All details about their API is here so you can either use the API connector or build a plugin.

1 Like

@Kfawcett thanks for the info! Actually, I’ve been fighting a lot to setup the API via API Connector (headers, etc.) The thing is I don’t get it working there. On the other hand, I can handle a external service (webtask.io) to write this code:

And using API Connector to make a POST call the webtask URL, I get this thing back in Bubble:

However, I don’t know what to do next to place an order using the signed message I get… Any ideas? Maybe you could share how you setup the API Connector, @Kfawcett (that would be great!)

Ive added a new custom state that provides access to the timestamp. I might throw everything out as states so you can generate the call and use the generated states as the api calls fields, even if you only do this as a test at least you will know the data and sig match,

Where should I see/access the custom state? Is this something that shows in the Workflow Actions or on the page? I’m not seeing it in either.

Its in the same place as the output, so - Encode/Decode’s HMAC Timestamp.

Disregard, had to refresh everything to see it.

Getting the following error.

image

Hey there, I’ve just purchased you plugin which is really cool, but I do miss a possibility to change the output when encodnig Hmac-sah1…right now it comes as HEX, but I need it to be Base-64. Would you please consider adding this feature? Thanks!

Just place another action right after the HMAC - to base64 encode, and reference the plugin’s HMAC output as the input to be base encoded. Then the output bill be updated to be base encoded. Just make sure if you require the encodedClient : encodedSecret you use the other action.

Yeah It came to me that this shloud be the way, but it doesn’t work with oauth 1.0.
The right output should be: MHJRcD/Ce4MbYCLvat9yP0Ta0DI=

  1. When I have a string and use your plugin - hmac encode > than base encode I’ve got this:
    MzA3MjUxNzAzRkMyN0I4MzFCNjAyMkVGNkFERjcyM0Y0NERBRDAzMg==

  2. When I have a string and use your plugin - hmac encode I’ve got this:
    307251703fc27b831b6022ef6adf723f44dad032

  3. When I have a string and use your plugin - hmac encode and than use (http://tomeko.net/online_tools/hex_to_base64.php?lang=en) - I’ve got this:
    MHJRcD/Ce4MbYCLvat9yP0Ta0DI=
    WORKS

But the third option is based on me manually using external webservice so not good solution enough.

I find that the right solution is to first decode the HEX output and than encode base 64. But I’m not able to code this by myself. If you have any advice or solution, It would be great. Thanks again man :slight_smile:

@pskrobanek, So this is what is going to be most interesting about how this plugin will evolve. People will have different uses, methods, needs and need not’s. so rather than add an output choice on the encode portion i have started a “Convert” Action, The first method of course being HEX --> BASE64. enjoy.

So awesome! finally I am able to sign my API request with Nokia Helath. Than you so much @jarrad!!

Good to hear :slightly_smiling_face: your very welcome.

1 Like

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