Sign-up REST API is used for the registration of new user accounts in the network via an Application Program Interface (API).

To access this functionality:

  1. Log into your Network Supervisor account.
  2. Click REST APIs Reference in the System Configuration group of the side menu:
Rest API Management
  • Keys Management section contains unique Public and Private keys along with the option to Regenerate them.
  • REST Sign Up Integration Guide contains a step-by-step integration guide.

User registration via public REST API is done by sending an HTTP POST request to a specific URI supported by the server.

By default, new user accounts in your network are not accessible until a Network Supervisor activates them in the User Management section of the Network Supervisor account. To automate new users' activation, the Network Supervisor should set the Auto-activate User permission to ENABLED in the Self-serve Preferences section of the User Roles & Permissions. This should be done for every role (Network Manager, Publisher, Advertiser, etc.) you would like to be automatically activated after registration.

General URL syntax:

https://n29.epom.com/rest-api/user-sign-up/{key}/{hash}/{timestamp}.do
  • {key} - unique Epom Ad Server Public key.
  • {hash} - an MD5 digest built on the concatenation of username, password, email, private Epom Ad Server key and a timestamp (in milliseconds) in the aforementioned order.
  • {timestamp} - Unix timestamp (in milliseconds).

Parameters supported by Epom RESTful registration service include:

  • username - account name in Epom Ad Server, maximum length is 64 symbols.
  • password - account password, 5-64 symbols.
  • email - user email, maximum length is 64 symbols. 
  • aclrole - ID of the role in Epom Ad Server; can be obtained via HTTP request.
  • phone - phone number (up to 64 symbols) in one of the following formats: +22(345)7891012, +1 790 123 7788, +23(1123)12-12-334.
  • firstName - user's first name, maximum length is 64 symbols.
  • lastName - user's last name, maximum length is 64 symbols.
  • websiteUrl - user's web-site URL (up to 64 symbols).
  • company - Company name, maximum length is 64 symbols (optional).
  • country - ISO Country name (optional).
  • state - State name, maximum length is 64 symbols (optional).
  • accountUIStyle - default user interface   "TREES" or "GRIDS" (optional, "TREES" by default).
  • comments - notes abour the user account (optional).

The request will return a response from server is JSON-formatted string format, which will contain successful call results, or the list of errors if they occurred during RESTful call processing.

The following API methods are used to manage the user accounts:

Get System Users

Returns all the users in a given network.

URL: /rest-api/system-users.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:

[{"username":"user","email":"user@example.com","role":"Publisher","status":"active","referer":null,"referredUsers":{},"created":"2016-08-15","firstName":"Publisher","lastName":"Publisher"},...]

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.
  • roles - (optional) ID or Name of the roles to filter the results; comma–separated.

Get User Info

Returns the User Information.

URL: /rest-api/user-preference/get.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Response sample:

    200 OK
{"success":true,"preference":{"username":"network2","password":null,"email":
"user@email.ua","phone":"098765433","firstName":"okckd","lastName":"rfef",
"websiteUrl":"http://epom.com","company":"epom","country":null,"state":null,
"accountUIStyle":"TREES","comments":null,"alcRole":"Network Manager"}}

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.

Update User Info

Updates User Information.

URL: /rest-api/user-preference/save.do

Method: POST

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.
  • 403 Forbidden – access denied.

Response sample:
200 OK

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.

Request format:

Method requirs request body in JSON format:

{
 	"username": "Login",
 	"password": {
 		"current": "12345",
 		"password": "54321",
 		"confirm": "1"
 	},
 	"email": "user@epom.com",
 	"phone": "+380 563423",
 	"firstName": "Firstname",
 	"lastName": "Lastname",
 	"websiteUrl": "http://epom.com",
 	"company": "Epom",
 	"country": null,
 	"state": "Alabama",
 	"accountUIStyle": "GRIDS",
 	"comments": "'preference':{'asd':'asdsad'}"
 }

Check Existing User Emails

Checks if a user with the given email exists.

URL: /rest-api/user-preference/check-email.do

Method: GET

Response format: application/json

Error codes:

  • 401 Unauthorized – authentication error.

Parameters:

  • hash – an MD5 digest of a concatenated username's MD5 password and a given timestamp.
  • timestamp – UNIX timestamp in milliseconds used for hash generation.
  • username – a given username.
  • email – encoded Email

Need more help?

Should you require any additional help with our solutions, do not hesitate to contact Epom technical support at support@epom.com. Our support managers are dedicated to resolving any issues and providing you with solutions and support if you face difficulties or have questions.