API needs SHA256 HMAC

I think the reason for the confusion is firstly i thought the custom formatters were only for App Connect, not Server Connect, and secondly it says save the file as custom.php or myFormatters.php and im in a node.js project wondering how this php thing is going to all fit together.
Anyway going to try and see what blows up

Wait. What? Are you on PHP or Node? You can’t use a php formatter with node.

1 Like

Just looked at node side of things. Looks like you need to create a new node module within a new index.js file

1 Like

Well I am trying out node for this particular project, so in node at the moment, but just looking at it even just using the run in browser in Node on a normal action is actually giving a file not found issue, so maybe i will revert to php for this initial test phase

managed to get onto computer
checking node formatters crypto.js seems to already have hmac

hmac: function(data, alg, secret, enc) {
return hmac(alg, data, secret, enc);
},

2 Likes

Can work out how to access it though!!!

Trying to figure that out myself right now, it’s there but it’s not
tumblr_ocbzw74wUQ1vdvmzzo1_500

so crypto.js shows formatters for

md5
sha1
sha256
sha512
hmac
transform
encodeBase64
decodeBase64
encrypt
decrypt

but when calling crypto in the GUI i only see those in bold, no hmac or transform

anyone any ideas

Trying out different syntax variations now, spray and pray style.

{{"my_api_key".hmac("sha256","my_secret")}}

image

1 Like

PERRRRfection, well done, thats a team effort, lol, working like a dream

2 Likes

3 of us together = 0.01 of a Patrick

2 Likes

You are clearly overestimating us.

Lol, not bad when you cross a Spaniard, a Brit, and a South African together, I think we did well finding and implementing a hidden feature.

Sounds like a bad joke.

What do you get when you cross a South African, a Brit and a Spaniard? Coronavirus for sure.

1 Like

Well the Brit probably wont hug and would use hand sanitizer, so more like.
What do you get when you cross a South African, a Brit and a Spainiard? A clean South African and Spainiard.

Luckily you guys do not take offence.

I am half british so it’s all cool for me.

1 Like

I am half Portugese, so I have no chance.

1 Like

Final working code

{{TIMESTAMP.toString().hmac("sha256","p_sBy??????????????41")}}
2 Likes

Prefer to be called English thanks, not Brit, english by name and birth, even if my mother was of irish/ scots heritage, Irish MacMurdo clan which settled in Scotland, Maybe I should just say Mongrel :rofl:

2 Likes