User authorization
Parameters passed to the game iFrame by GET method.
warning
If an iFrame games there is a need for navigation links, then they need to pass required parameters.
Parameters | Data type | Required | Decription |
---|---|---|---|
api_id | string | Yes | Game |
viewer_id | int | Yes | User |
xdm_p | int | Yes | Always |
xdm_e | string | Yes | Link to portal 101XP.com |
xdm_c | string | Yes | Request identificator |
auth_key | string | Yes | Request signature |
is_app_user | boolean | Flag of installation (currently 1) |
Signature calculation (the auth_key param) for user authorization:
$auth_key = hash('md5', $_GET['viewer_id'] . $_GET['api_id'] . 'PRIVATE_KEY');
if($auth_key != $_GET['auth_key']) {
die('Invalid parameters');
}
The PRIVATE_KEY could be obtained from project manager.