Your current implementation doesn't work anymore, it now uses timestamp instead of a nonce.
Here's a fix for you (line 699):
private function generateNonce() {
$nonce = (string) time() + 15;
return $nonce;
}
and at line 588
$headers[] = "api-expires: $nonce";
The api-nonce header is no longer needed