Wowza Community

Can't get Stream Target Token working with NodeJS

I am trying to get tokenization working for a Stream Target in the Wowza Cloud. I am using Node.js (the only language where an example was not provided), I went through both the Python and PHP examples multiple times to make sure that I was adding the proper/required parameters, and I also compared the output to the generated hashes… Their query parameters work, whereas mine do not. Could someone tell me what I am missing here?

Wowza Generates:

My Code Generates: ?hdnts=exp=1491680344~acl=*~hmac=76f0022f5f68e7b0c071b683243ccf15a0ed0fea6dc9b653943a438c08577261

app.get('/token/', function(req, res){
	var end_time = moment().add(5, 'days').unix();
    var acl      = "*";

    newToken = "exp=" + end_time + "acl=" + acl;
    var hash = crypto.createHmac('sha256', wowzaSecret);

    var hmac =;

    var returnHash = "?hdnts=exp=" + end_time + "~acl=*~hmac=" + hmac
    res.json({data: returnHash})

   //Return Hash Generates   
// ?hdnts=exp=1491680344~acl=*~hmac=76f0022f5f68e7b0c071b683243ccf15a0ed0fea6dc9b653943a438c08577261//Compared the the Test Hash generated by wowza// ?hdnts=exp=1491247947~acl=*~hmac=495bbcdd8d2d88adf036fd5f8756aa91c6cb91a35fe38428ffaa0f669264b030