Redirect
To sync a UMI account with a game through a link, you can follow these steps:
When a user clicks on the "Play Now" button in Umiverse, they will be redirected to your game through a link that contains UMI_UID, ts, and signature parameters.
Use these three parameters to automatically register the user and allow them to experience your game.
// example
const umi_uid = 1;
const ts = 1686026506;
const secretkey = 'umikey';
const params = {uid:umi_uid};
const sign = generateSign(params, secretKey, ts);
const url = `https://yourgame.com/game?uid=${umi_uid}&ts=${ts}&sign=${sign}`;
console.log(url);
/**
* output:
* https://yourgame.com/game?uid=1&ts=1686026506&sign=2d5e4e7d5a9f1b6b0d6d2d7d8e4e9b1f
*/
Last updated