What’s it all about
We are launching a new type of games on our platform - hypercasual games.
We are trying to make their launch on our platform as easy as it could be. How it differs from common games:
- you don’t need to implement in-app payments in your game. Ads monetization only is fine for us;
- you don’t need to implement any social mechanics (by implementing them would be great) like user communications, publishing user topics or any other social stuff;
- new and hypercasual games only featuring mechanics will be available on our platform.
To launch such an app it’s required to:
- get a developer access for yourself;
- create an API application on our platform;
- identify OK users on game launch;
- implement an ads monetization;
- successfully pass our moderation review.
How to get developer access
To acquire an access to developer-only sections of OK you need to get developer access on this page: ok.ru/devaccess
All users planning to have an access to your app before it’s publication must get developer access.
How to create and set up an application
After you’ve finished getting developer access you now can create an API application. This app will be used as an entry point for your game. Also it’s required to work with our API.
To create an app you can follow this instructions
Make sure when setting it up you’ve enabled following platforms:
As an app’s link you must specify your game’s URL.
After app is created an email with essential app’s data will be sent to you. It will contain following information:
- ID - unique application identifier;
- secret key - it’s used to access app’s settings;
- public key - it’s used for OK API access.
Don’t forget to keep these keys safe.
After you’ve correctly set up an application it will be available for it’s creator by this links:
- https://m.ok.ru/game/appId - on mobile platforms;
- https://ok.ru/game/appId - on desktop.
It will also be displayed in a special “my uploaded games” section of games in our mobile apps for android and iOS platforms.
How to make a game available for other developers
If another user needs an access to your “under development” game on out platform (i.e. for testing it) follow these three steps:
- user must get a developer access here;
- app’s creator and this user must be friends on OK;
- app’s creator can then add this new developer to app’s developers list following this instructions
How to identify OK user in your game
After app is correctly set up when it is accessed via https://ok.ru/game/gameId link your game will be opened on our platform in an iframe.
In a query part of an URL a dozen of other parameters will be passed to your app:
- logged_user_id - unique user identifier;
- user_name - user’s name and surname;
- user_image - user’s avatar URL;
- user_gender - user’s gender. 1 - male, 2 - female.
This is not a full list of parameters. Full list can be seen here.
Launching app in an embedded window
Alternatively there is an option for hypercasual games to launch on our mobile platforms not on a separate page but as an embedded application on current user’s page.
How it looks:
How it differs from a standard launch type:
- user won’t be transferred to a separate game page;
- game frame sizes are obviously a bit smaller.
These are the only two differences from a standard game launch type. All other features we provide for games are available, such as social API and ads monetization.
How to enable this format:
- request it by sending an email to us;
- specify user ids if your want to test your app before launching it for users;
- after development is finished inform us that game is ready to be launched as an embedded app for all users;
- you can send all requests either via JIRA or to our tech support email: email@example.com.
How to detect that your games was launched as an embedded app:
- we will pass a launch_type parameter with value bottom to a game frame in case it was launched this way.
Two types of ads monetization are available for games on our platform:
- rewarded ads;
- interstitial ads.
Using our SDK is quite easy. You need to:
- add FAPI script to your game’s code;
- specify a callback function;
- use two SDK methods to find and show an ad.
To impement this type of ads in your game following two SDK methods should be used in your game:
- to find an ad - FAPI.UI.loadAd;
- to show previously found ad - FAPI.UI.showLoadedAd.
These methods are available on all our platforms (desktop web, mobile web, android and iOS apps).
This type of ads requires a single SDK method to be implemented:
- to find and show an ad - FAPI.UI.showAd.
Interstitial ads are available only on android platform at the moment.
Setting up FAPI
It’s enabled in your game by adding a single line of code:
Methods from the FAPI.UI group don’t require the callback function to be passed. After the method is executed, a global function will be called, and the developer must realize it. The function must have the signature:
- method - the name of the method called
- result - the result of the execution (“ok” if successful, “cancel” if the user canceled the action)
- data - additional information, for example, for showInvite() – a list of IDs of invited friends, separated by commas, in the string format.
Finding a rewarded ad
Displaying a rewarded ad
Displaying an interstitial ad
After your app is ready to be launched it needs to be moderated by us.
To create a moderation request you just need to fill up a moderation form
If everything went good you’ll get an email with account credentials for our moderation JIRA.
Starting from this point communications will be processed there.