Get User data

The user ID here will always be users ID from your site, not their deemly ID.

Parameter Note
UserId The User ID of the user. Required

PHP



$app_key    = 'YOUR-APP-ID';
$secret_key = 'YOUR-APP-SECRET';
$user_id    = 'The deemly user id';

// Our salt - leave as is
$salt = 'salt'; // You'll find this in yuor app settings
$security = new SecurityManager($app_key, $salt, $secret_key);

$userAgent = 'PHP';
// Yir, ticks in PHP...
$ts = microtime(true);
$ticks = intval($ts) * 10000000 + 621355968000000000;
$message = $security->GenerateToken($app_key, $secret_key, $userAgent, $ticks);


$ch = curl_init();
$headers = array(
    'Accept: application/json',
    'content-Type: application/json',
    'Authorization: amx ' . $message
);

curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt( $ch, CURLOPT_USERAGENT, $userAgent);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt( $ch, CURLOPT_URL, "https://portal.deemly.co/api/user-ratings-reviews?UserId=".$user_id );

// Return the deemly user info in json
return curl_exec( $ch);

// Close handle
curl_close($ch);

Jens Farvig Thomsen

Co-Founder & CPO

Let's talk

Request free demo