function generateToken(token) {

  var token = di.uuid.v4();
  var globalDirPath = getGlobalDirectory();
  var tokenPath = di.path.join(globalDirPath, 'token.txt');

  di.fs.writeFileSync(tokenPath, token, 'utf8');

  return token;

}
Generate and save a token to be used for uploading recordings

@param  {String} token
@return {String}