I am trying to implement an identity verification provider through their API.
One of the headers in the API call is an API token that is generated by using my API-key and timestamp as input for an SHA256 hash.
If the token could be generated just once I could easily find somewhere to generate it, but since it includes a time stamp it will have to be recreated for every api call.
I think I could connect to an API that could generate the hash and send it back to bubble, but I haven’t found a provider of this yet.
@pnodseth were you successful in finding a provider online? Everything I’ve come across talks about generating it on your own server with php, C#, etc.
I saw webtask.io in my search also, but wasn’t sure if you could create an API to call it. My use case is connecting to Amazon to return products and the last part of their API requires combining all of the previous key/values and generating a HMAC-SHA256 code as the last key called Signature. So I was thinking I could call another API, send it all of the key/values to generate the Signature value.
You can use the plugin ToolBox. It’s got a workflow action called ‘Server script’, with which you can use Node.js’s built-in modules ‘crypto’ and ‘buffers’:
var crypto = require('crypto')
, text = 'I love cupcakes'
, key = 'abcdeghi'
, hash;
var hash = crypto.createHmac('sha256', key).update(text).digest('hex');
var base64 = Buffer.from(hash).toString('base64');
Any idea how you do this in the API setup/initialisation? For the API to Initialise, don’t you have to be able to create the signature initially (and at that precise moment?)