Skip to content
Luís Gustavo edited this page Jun 30, 2018 · 96 revisions

Registration

To register to become developer, go here to register.

If your application is accepted you will receive custom credentials to access the API.


Credentials

To access the API you'll need your own set of credentials which consist of a developer id (devId) and an authentication key (authKey). The process of obtaining credentials should be a one-time activity.

Here are the credentials for a sample account:

DevId AuthKey
1004 23DF3C7E9BD14D84BF892AD206B6755C

Use your personal credentials to access the api via a Representational State Transfer (REST) web service hosted at http://api.realmroyale.com.

Note that the same DevId/AuthKey combination should work for SmiteAPI, PaladinsAPI and RealmRoyaleAPI, across all supported platforms.


Sessions

To begin using the API, you will first need to establish a valid Session.

To do so you will start a session (via the CreateSession method) and receive a Session. Sessions are used for authentication, security, monitoring, and throttling.

Once you obtain a Session, you will pass it to other methods for authentication.

Each session only lasts for 15 minutes and must be recreated afterward.


Signature

A MD5 hash of (devID + method + authKey + timestamp)

Actually the authKey isn't passed directly, but instead embedded and hashed in another parameter (signature).

It's a combination of devID, authKey, method (without the response format), and the Timestamp.

C# Sample:
private static string GetMD5Hash (string input) {
	using (var md5 = System.Security.Cryptography.MD5.Create ()) {
		var bytes = md5.ComputeHash (System.Text.Encoding.UTF8.GetBytes (input));
		var stringBuilder = new System.Text.StringBuilder ();
		foreach (byte b in bytes)
			stringBuilder.Append (b.ToString ("x2").ToLower ());
		return stringBuilder.ToString ();
	}
}
public string generateSignature (devId, method, authKey, timestamp) {
	return GetMD5Hash (devKey + method + authKey + timestamp);
}
var signature = generateSignature (1004, 'createsession', '23DF3C7E9BD14D84BF892AD206B6755C', getTimeStamp ());
Javascript Sample:
const md5 = require ('md5');
function generateSignature (devId, method, authKey, timestamp) {
	return md5 (`${devId}${method}${apiKey}${timestamp}`);
}
var signature = generateSignature (1004, 'createsession', '23DF3C7E9BD14D84BF892AD206B6755C', getTimeStamp ());
Python Sample:
from hashlib import md5 as getMD5Hash
def __encode__ (_input, encodeType: str = "utf-8"):
	return str (_input).encode (encodeType)
def generateSignature (devId, method, authKey, timestamp):
	return getMD5Hash (__encode__ (devId) + __encode__ (method) + __encode__ (authKey) + __encode__ (timestamp)).hexdigest ()
signature = generateSignature (1004, 'createsession', '23DF3C7E9BD14D84BF892AD206B6755C', getTimeStamp ());

Timestamp

The current UTC timestamp formatted to 'YYYYMMDDHHmmss'.

C# Sample:
public static string getTimeStamp (string format = "yyyyMMddHHmmss") {
	return System.DateTime.UtcNow.ToString (format); 
}
var timestamp = getTimeStamp ();
Javascript Sample:
const moment = require ('moment');
function getTimeStamp () {
	return moment.utc ().format ('YYYYMMDDHHmmss');
}
var timestamp = getTimeStamp ();
Python Sample:
def getTimeStamp (format = "%Y%m%d%H%M%S"):
	from datetime import datetime
	return datetime.utcnow ().strftime (format)
timeStamp = getTimeStamp ()

API Access Limits

To throttle API Developer access various limits have been setup to prevent over use of the API (either intentional, more likely unintentional “over use”).

Here are the default initial limitations for API Developers:

Concurrent Sessions Daily Sessions Session Time Daily Request
50 500 15 minutes 7500

Platform Endpoint Base URLs

To retrieve all information from the Realm Royale API, you will need to append all requests to the Realm Royale API endpoint, and all requests must begin with the method you're wanting to access concatenated with the response type you're wanting.

PC PS4 XBOX
http://api.realmroyale.com/realmapi.svc No yet No yet

Calling API Methods

BaseURLEndpoint/MethodPattern[ResponseFormat]/Params
The url format for calling a method from the api

Name Description Example
BaseURLEndpoint The Endpoint that you want to use http://api.realmroyale.com/realmapi.svc
MethodPattern The pattern for the method above, where [ResponseFormat] is replaced by the formatting that you want returned (either JSON or XML). /CreateSessionJSON
Params The method params /{devID}/{signature}/{timestamp}

Parameters


Classes IDs

There are multiple Classes in Realm Royale. Each one has its own unique abilities and fighting style.

Each class has a unique passive bonus, movement ability, and 4 special abilities.
Additionally each class can craft a unique weapon at the forge.

There are currently 5 playable classes:

ID Name In-Game Name Image
2285 Male Tank Warrior
2493 Female Damage Hunter
2494 Female Support Mage
2495 Male Utility Engineer
2496 Male Flank Assassin

Player Status

ID Description
0 Offline
1 In Lobby (basically anywhere except god selection or in game)
2 god Selection (player has accepted match and is selecting god before start of game)
3 In Game (match has started)
4 Online (player is logged in, but may be blocking broadcast of player state)
5 Unknown (player not found)

Queue IDs

ID Name In-game name
474 Solo LIVE Solo
475 Duo LIVE Duo
476 Quad LIVE Quad

Rank tiers & divisions

Ranking is based on the player's placement in their top 50 matches (even if they haven't played 50 matches, they will still receive a rank based on the placement in all of the current matches).

Players can only work their way up the ranks by placing higher and higher in matches, and can't fall over time.
Once a player has reached 50 wins, the game will also track the total number of eliminations they have made within those top 50 games.

Each queue (solo, duo and squad) has its own separate ranking.

Tiers

Ranked has several tiers that players can be placed in, from Bronze to Grandmaster. Players without a tier will be set as Unranked.

ID Name Image
0 Unranked
1-5 Bronze
6-10 Silver
11-15 Gold
15-20 Platinum
20-25 Diamond
26 Master
27 Grandmaster
Divisions

Each tier except for Master and Grandmaster is divided in 5 divisions.

ID Name Image
1 Bronze V
2 Bronze IV
3 Bronze III
4 Bronze II
5 Bronze I
6 Silver V
7 Silver IV
8 Silver III
9 Silver II
10 Silver I
11 Gold V
12 Gold IV
13 Gold III
14 Gold II
15 Gold I
16 Platinum V
17 Platinum IV
18 Platinum III
19 Platinum II
20 Platinum I
21 Diamond V
22 Diamond IV
23 Diamond III
24 Diamond II
25 Diamond I
***

Ranking Criteria

ID Description
1 Team Wins
2 Team Average Placement (shown below)
3 Individual Average Kills
4 Winrate