<script>
var jwt = require('jwt-simple'); //node install --save jwt-simple

var ORGANIZATION_SECRET = 'YOUR SECRET HERE';
var BASE_URL = 'https://embed.chartio.com/d/331799';

var now = parseInt(new Date().getTime() / 1000);

var payload = {
    'iat': now,
    'nbf': now,
    'exp': now + 86400, //one day from now.
    'dashboard': 331799,
    'organization': 34900,
    'env': {"MYVAR": 42}
};

var token = jwt.encode(payload, ORGANIZATION_SECRET, 'HS256');
console.log('<iframe src="' + BASE_URL + '/' + token + '"></iframe>');
  </script>