Home » Chat con Edgar

Chat con Edgar

privKey: “.$privKey;
echo “
“;
echo “
clientId: “.$clientId;
echo “
userId: “.$userId;
echo “
userName: “.$userName;
echo “
timestamp: “.$timestamp;
echo “
plain token: “.$token;
echo “
sent signed token (base64): “.$b64Signed;
}
return $b64Signed;
}
//

//*************
/* Optional parameters */
// Show debug info. Switch to “false” once integration is tested.
$debug = ‘false’;

/* Required parameters */
// clientId assigned by ViTAM. Do not change.
//$clientId = ‘d2521df9-ea30-11e2-b9bf-18a9053d294a’;
// nuevo id de cliente
$clientId =”b4897504-2f65-11e4-9c80-c4346b22d654″;
// Assign userId

$userId = ‘user-Id-‘ . get_current_user_id( );
//$userId = ‘user-Id-juangarcia’;
// Assign userName
$userName = get_current_user_id( );

$user_info = get_userdata(get_current_user_id( ));
$userName = “(“.$user_info->user_login.”)”;
// se puede obtener el nombre y apellido
// $first_name = $user_info->first_name;
// $last_name = $user_info->last_name;

// Assign role
$role = “user”;
// Assign room identifier
if (get_current_user_id( ) == “1”) {
$role=”moderator”;
}
$room = ‘room1’;
// Assign language
$language = ‘es’; //lower case
// Compute token. Edit to specify your path to token3.php

$token = getToken($clientId, $userId, $userName, $debug);

?>

Deja un comentario