What you need to know before you start
Here is what you need to know when you are starting to integrate your game with Spil portals and systems.
We will provide you a game page on our integration portal that will have an iframe. The iframe will point to your game. You can use this environment in order to start integrating your game into our portals.
Furthermore we will provide you access to our payment tool where you can set the packages and manage the price of your virtual currency.Â To do that we will need some information from your side:
- A game URL publicly accessible, so our server can reach it.
- Desirable width and height of the iframe.
- An e-mail address that will receive automated payment failure notifications. Since this address may receive many notifications, itâs advisable to provide us a dedicated one.
- The e-mails of the people that will handle your companyâs payment account in our payments back-end. Use the e-mail as username and in order to set up your password click on the button âI forgot my passwordâ and follow the instructions.
In case you havenât provided the above information to anyone at Spil Games, please send them to IntegrationSupport@spilgames.com.Â If you want to we can arrange a phone/Skype call in order to kick-off the integration.
The API currently offers the following features:
âÂ Log in the users to your game and retrieve user data
âÂ offer in-game purchases through the Spil Games Payment Service
âÂ retrieve the userâs friendsÂ (so users can beÂ exposedÂ to each other in-game and they can start interacting)
âÂ allow the user to send their portal friends an invitation via email to come play the game
âÂ dynamically adjust the height of the game
âÂ integrate game breaks (to be used with in-game ads for example)
Whatâs not currently available through our API is posting on a friends wall or sending a gift to a friend.
Starting the Integration
We will provide you a game page containing an iframe which points to your game. On the iframe URL we pass the following parameters. Your game can read these parameters.
|siteid||Integer â Holds the site ID value (ex.: 88)|
|channelid||Integer â Holds the channel ID value (ex.: 1). This information is relevant to us, please ignore it.|
|appToken||String â Among others holds
â¢ Application ID which is a unique game id,
â¢ GUID which is a unique User ID,
â¢ Site id,
â¢ Channel id.
By decoding the App token you can validate the username that is passed in the iframe url. Please keep in mind that is not mandatory to validate the appToken from your side.
For further details about the appToken see below.
|UID||String â This parameter is here for backwards compatibility reasons and is deprecated. Please ignore it.|
|username||String â Holds the userâs username (ex.: john_smith). If no username is passed you are dealing with a guest user.|
|siteLocale||String â Holds the Locale of the site (ex.: en-US)|
Do we have toÂ allow guest Users?
Itâs totally up to you if you want to allow guest users or only register users are able to play yourÂ game. In case you choose the latter you should create a landing screen for the guest users. In this screen you explain that they need to register in order to play and place a button that triggers our login pop up. You will find more information on how to implemented here.
Do you have a unique identifier for your users?
Yes, itâs the valueÂ called GUID on ourÂ system. Itâs unnique for a user, same on all of our portals. You can retrieve it in two way.
- From the getUser call.
- From validating the appToken.
The appToken is an extra security layer, a way to validate that the user data. From our side it is NOT mandatory to validate the appToken, itâs totally up to you. More information about the appToken you can find here.
In case you do want to validate the appToken please request the secret from our side. Note that it can take up to 5 days to get back the secret from us.
Whatâs Spil policy in regards to game localization?
We prefer toÂ release games that are localized on the portal language.
How can IÂ serve the same language as the portal?
From the game iframe URL we are passing the parameter âsiteLocaleâ. The best way is to get the locale from thereÂ and serve the proper language to the user.
How can I test the language selection implementation?
You can use the language toolbar as the picture below. By clicking to a language it will reload the game passing the locale that you selected.
To use the Spil Games Payment service,Â follow the links below: