Skip to main content

Open lobby

In order to open the lobby, use the link sent as a response for the request to create a session. The following diagram describes the interactions between a player, your casino and EBG when a user opens the lobby for the first time after the registration.

The link to open the lobby (lobby URL) may be opened any way that suits you: in a new window, in the current window, in an iframe. On mobile platforms, the URL should be open in a new window for it to be displayed correctly.

NOTE: Please use this tool to check your integration implementation for user authorization: https://tests.evenbetgaming.com/opensession/

Creating a session

Request URL

POST http(s)://API_URL/v2/app/users/:userId/session?clientId={CLIENT_ID}

Request header (HTTP Header)

Parameter NameDescriptionOptional / Mandatory
signRequest signatureMandatory

Request parameters

Parameter NameDescriptionOptional / Mandatory
clientIdCasino identifier that is sent in the request line.Mandatory
userIdUser identifier.Mandatory
userIpUser IP. This parameter is only relevant if you want to open a specific casino game or sport. Optional
sessionIdExternal session identifier. If specified, can be used in seamless wallet callbacks.Optional
nicknickName or displayName (variable) may be sent.Optional
authTypeAuthorization type. Possible values: internal, external. You need to send the value 'external' in case you open html5 application in browser, and internal in case the session is created in the client application (desktop or mobile).Optional. Default value is 'external'.
langClient application localization language. It is a two-letters ISO language code.Optional. Default value “en”.
launchOptionsAdditional launch options for html5-application. It is a JSON associative array.Optional
currencyISO currency code. Specified currency will be used as default user currency. It must be configured before use.Optional
gameCodePossible values: poker, casinolobby, casino, sport. 'Poker' opens HTML5 poker app or localhost and sends all parameters there or it opens a specific table; 'casinoLobby' opens the URL that is specified as casino URL and sends the data there; 'casino' opens a specific casino game; 'sport' opens sportsbook or a specific sports game. If you do not set the value for this parameter, poker will be opened. Optional
tableIDThis parameter specifies the cash table that must be opened. Optional
gameIDThis parameter specifies the game that must be opened. It could be the ID of a casino or sports game. Optional
longLifeLoginToken

This parameter specifies whether a long-life access token is used for opening a session. Long-life tokens allow for longer uninterrupted user sessions. The lifetime of the of the token can be specified in System configuration - LongAuthorizationTicketLifetime

Optional
Possible values: true and false

Possible launch options

Option NameDescription
restoreSessionUrlURL to your server. If user session expired in html5 application, then the user will be redirected to this URL. The user should be logged in again, then a new session should be created and the user should be redirected to the given redirect link.

Here are the values for optional parameters required to open various parts of client application:

  1. Poker lobby
  • gameCode = poker
  • authType = internal, external
  • launchOptions = additional launch options (optional)
  1. Poker table
  • gameCode = poker
  • authType = internal, external
  • tableId = table identifier
  • launchOptions = additional launch options (optional)
  1. Casino lobby
  • gameCode = casinoLobby
  • launchOptions = additional launch options (optional)
  1. Casino game
  • gameCode = casino
  • gameId = game identifier
  • currency = currency ISO code
  • userIp = user IP
  1. Sport
  • gameCode = sport
  • currency = currency ISO code (optional)
  • userIp = user ip
  1. Sport game
  • gameCode = sport
  • gameId = game identifier
  • currency = currency ISO code (optional)
  • userIp = user ip

Response parameters

Parameter NameDescriptionOptional / Mandatory
redirect-urlURL to open lobbyMandatory
session-idSession identifierMandatory
user-idUser identifierMandatory
authAuthorization tokenMandatory

Errors returned

HTTP CodeMessageDescription
400Not valid requestIncorrect request signature
404Player not foundThe user with userId sent was not found (in case our own userId was sent)
422Auth type not validauthType parameter value is given but it does not match any of the possible values
Currency cannot be blankParam 'currency' is required but was not sent. An error may occur only if param 'currency' was configured as mandatory.
Currency not foundCurrency with ISO code sent was not found. An error may occur only if param 'currency' was configured as mandatory.
This currency is not activeCurrency with ISO code sent is not active. An error may occur only if param 'currency' was configured as mandatory.
500A Player with this username already exists in the system.User with this nickname is already registered in the system
The maximum username length is XMaximum length of nickName is exceeded

Example of response

{
"data": {
"id": "",
"type": "session",
"attributes": {
"redirect-url": "",
"session-id": "",
}
}
}