Binance API {“code”:-1022,”msg”:”Signature for this request is not valid.”}. Not sure what I am doing incorrectly

I’m not sure what is wrong with this code. I think I might be missing something somewhere but I can’t figure it out. I keep getting the error

const ts = Date.now()

var crypto = require('crypto')
                  , text = 'recvWindow=59999&timestamp=ts' 
                  , key = 'BqDjQf3F5VNOvSaX1rncMsZqmSOpGTBPz5UgOohto0P3bQlfHvjUlVrkbYc6pwc3'
                  , hash;

var hash = crypto.createHmac('sha256', key).update(text).digest('hex');


[hash, key, ts.toString()];