SOLVED

Unix Timestamp

Go to solution
Diego_Lineros2
Level 7

Unix Timestamp

Hi all,

Any way to get a system token with Unix Timestamp, or populate a field with it?

Thank you!!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Unix Timestamp

Make sure you're on

     api.teknkl.com/flowboost_v16/run

View solution in original post

8 REPLIES 8
SanfordWhiteman
Level 10 - Community Moderator

Re: Unix Timestamp

Heh, I know you have a way, Diego, if you know what I mean.

var timestamp = new Date().getTime();

Diego_Lineros2
Level 7

Re: Unix Timestamp

I know.. but I was trying to save transactions.

SanfordWhiteman
Level 10 - Community Moderator

Re: Unix Timestamp

Understood! What do you need to use epoch time for where it can't be converted from ISO on the way into whatever system needs it next?

Diego_Lineros2
Level 7

Re: Unix Timestamp

I think I was trying to do something silly, I was trying to generate an Oauth 1.0 header to be used in a Marketo webhook custom header using tokens, so I've got everything so far, Timestamp, Nonce, Keys, but I think that the Signature is not possible due to Hmac-Sha1 crypt, unless something can be done through crypto-js

SanfordWhiteman
Level 10 - Community Moderator

Re: Unix Timestamp

Upgrade to v16 (/flowboost_v16/run endpoint).  crypto-js is exported as FBUtil.crypto. So:

var sig = FBUtil.crypto.HmacSHA1("blahzay","blah");

Diego_Lineros2
Level 7

Re: Unix Timestamp

That's great! ... but any idea why I am getting

{"errorMessage":"ERR: Runtime error (strict mode): TypeError: Cannot read property 'HmacSHA1' of undefined"}

SanfordWhiteman
Level 10 - Community Moderator

Re: Unix Timestamp

Make sure you're on

     api.teknkl.com/flowboost_v16/run

SanfordWhiteman
Level 10 - Community Moderator

Re: Unix Timestamp

Also, maybe there's an easier way to integrate with whatever that back end OAuth-secured service is (as in: maybe they have a framework that we can export into FlowBoost directly).  Let me know via email.