1. Log into your Supervisor account.
  2. In the Menu section find Rest API Management button and click it.
  3. In the Keys Management section you can generate Public Key and Private Key.
  4. In the REST Sign Up Integration Guide you will find step-by-step guide for Sign up integration.

Rest API Management img1 600x510 Sign up REST API

User registration in Epom system can be done through its public REST API by means of calling specific URI supported by server with HTTP POST request.

General URL syntax:


Here {key} represents Epom Server public key, {timestamp} is a current Unix timestamp on requesting system(in milliseconds) and {hash} is a MD5 digest biult on concatenation of username, password, email, private Epom Server key and a timestamp(in milliseconds) in exact aformentioned order.

Parameters supported by Epom RESTful registration service are:

username – (required, maximum length is 64 symbols);
password – (required, minimum length is 5 symbols, maximum length is 64 symbols);
email – (required, maximum length is 64 symbols, valid email address syntax);
role – can be one of the roles presented by Epom System(ADVERTISER,PUBLISHER);
phone – (required, format like +22(345)7891012, +1 790 123 7788, +23(1123)12-12-334, maximum length is 64 symbols);
firstName – (required, maximum length is 64 symbols);
lastName – (required, maximum length is 64 symbols);
websiteUrl – (required, maximum length is 64 symbols, valid url syntax);
company – (not required, maximum length is 64 symbols);
country – (not required, two symbol abbreviation);
state – (not required, maximum length is 64 symbols);
enable_market_integration – (not required, boolean value);

Code sample for API integration

/* REST keys taken from REST API management tab in control interface of Epom Server */
$rest_publickey = ’2d2012203d6311e3′;
$rest_privatekey = ’4e457bc03d6311e3′;
$rest_timestamp = round(microtime(true) * 1000);

/* Data of user that should be rigistered through API */
$phone = ‘PHONE_OF_NEW_USER_GOES_HERE(format: +1 123 1233322)’;
$website_url = ‘SITE_URL_OF_NEW_USER_GOES_HERE’;

/* Hash for request authentication and validation */
$hash = md5($user_name.$password.$email.$rest_privatekey.$rest_timestamp);

/* REST API mount point for use registration */
$rest_url = “https://n29.epom.com:443/rest-api/register-user/$rest_publickey/$hash/$rest_timestamp.do”;

/* Data being posted */
$post_data = array(
‘username’ => $user_name,
‘password’ => $password,
‘email’ => $email,
‘role’ => $role,
‘phone’ => $phone,
‘firstName’ => $first_name,
‘lastName’ => $last_name,
‘websiteUrl’ => $website_url

/* Options of HTTP request; http key should be used when posting to https url */
$options = array(
‘http’ => array(
‘header’ => “Content-type: application/x-www-form-urlencoded\r\n”,
‘method’ => ‘POST’,
‘content’ => http_build_query($post_data)

/* Actual call to REST URL */
$context = stream_context_create($options);
$result = file_get_contents($rest_url, false, $context);

echo “$result\n”;