Initialize API with a timestamp

I am trying to initialize an api call that requires a timestamp. Without the ability to use dymanic fields for initialization, what should I do?

This topic was also brought up in another post that is now closed:

Has anyone done this? I don’t want to use Blockspring.

Im assuming the stamp they want is UNIX aswell?

of course. Why would they make it easy?

Cant fault that statement… lol, how tolerant is it? are we dealing with a one second sign it paste it and drop the same stamp in the header or a bit longer? I ask because some are just about there for show when you actually make the call.

I hope it’s for show. I also thought about setting the initialize call value to be in the future by 10-15 seconds and using a timer on my phone.
We’ll see how tolerant it is…

if it comes down to being within a bee’s thingo my next move would be to have it set so your all filled in as far as the call goes and then open console with a setInterval() function running every second and an if matches time then click the init button…
making sure you have your call at the bottom so its the last one overall and you place your timestamp where the demo one is in green.

var myStamp = 1524239409532; // put the stamp you used here


var unix = Date.now();
var interval = setInterval(function(){  
  if (unix >= myStamp){  // if unix is = or > than stamp then click the init button
    $('.btn.bubble-ui.grey.new-button.inner-button').last().click();
    console.log('Its ' + unix + '! Call fired!');
    clearInterval(interval); // stop the madness
  }else{ 
    console.log('Not yet... Its only ' + unix);
    setInterval(interval); // not time yet the run again (runs every half second so its as close as your going to get as unix is 1 second per tick)
  } 
}, 500);

setInterval(interval); // start the madness

if your ok with console you can add an id attribute to the button and swap the classes to avoid the need for the call to be at the bottom.

1 Like

Wow, I wish I understood anything past bee’s thingo…

I was able to get it to work with a countdown timer and this, as I first had to create a SHA1 hash:
http://www.timestampgenerator.com/tools/sha1-generator/

1 Like

Sweet so it wasnt to strict on the sig time and so on… that above is just a past into your console with the api connector open and hit enter… when the stamp you had setup matched the current time it would fire the connector off… the hardest of ways are usually the most entertaining. Lol

That’s Awesome! Thank you very much.

1 Like