Getting Started

Registration

A Credentials that will provide access to Hi-Rez Studios API.

If you don’t already have a Credentials, click here to become developer.

Attention

If your application is accepted, you will receive an e-mail from Hi-Rez Studios containing your personal Credentials within a few days.

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).

Here are the Credentials for a sample account:

devId authKey
1004 23DF3C7E9BD14D84BF892AD206B6755C

Note

The same devId and authKey combination should work for Paladins API, Smite API and Realm Royale API, across all supported platforms.

Do not request a new, if you already have a Credentials.

Importing

import pyrez
import pyrez.api
from pyrez.api import PaladinsAPI, SmiteAPI, RealmRoyaleAPI
import pyrez.enumerations
import pyrez.models

Creating API object

paladins = PaladinsAPI(options)

#or
smite = SmiteAPI(options)

#or
reamlRoyale = RealmRoyaleAPI(options)
Options can have the following fields:
  • devId (int) – This is the Developer ID that you receive from Hi-Rez Studios.
  • authKey (str) – This is the Authentication Key that you receive from Hi-Rez Studios.
  • responseFormat (Format) – The response format that will be used by default when making requests.
  • sessionId (str) – The response format that will be used by default when making requests.
  • storeSession (str) – Allows Pyrez to read and store sessionId in a .json file.

Sessions

Sessions are created automatically and self-managed by Pyrez so you really don’t need to initialise / call this method directly. However, you can set it manually or even request a new Session.

Manually:

paladins = PaladinsAPI(devId=1004,
                      authKey="23DF3C7E9BD14D84BF892AD206B6755C",
                      sessionId="1465AFCA32DBDB800CEF8C72F296C52C")

Requesting a new Session:

paladins = PaladinsAPI(devId=1004, authKey="23DF3C7E9BD14D84BF892AD206B6755C")
session = paladins._createSession()
print(session.sessionId)

>>> '1465AFCA32DBDB800CEF8C72F296C52C'