App creation and roles management
To get an application ID and keys, it should be created following this instruction.
After the application is created, users can be added for the development stage. Click the Developers link and give the required rights (see user roles).
When application is launched on Odnoklassniki the number of GET parameters will be passed in an URL.
Depending on a platform where application was launched (desktop / mobile) lists of this parameters can be different:
- if an application was launched on desktop container parameter will be passed with true value;
- if an application was launched on mobile (browser or webView for Odnoklassniki android app) mob parameter will be passed with true value.
Parameters listed below are transmitted to applications that are opened in iframe:
- as request parameters for HTML applications;
- as flashvars for Flash applications.
|Main URL of API server, for example: https://api.ok.ru/
|Application public key
|MD5 hash-sum of logged_user_id+session_key+application_secret_key parameters. Can be used for easier checking of a logged in user
|1 if the user has authorized the application; otherwise 0
|Will be passed as true, if application was launched within native application or iframe (no extra heading from widget.getWidgetContent is required)
|Will be passed as true, if application was launched on mobile)
|Mobile platform on which game was launched. Passed to game only if parameter mob is true.
- androidweb - mobile browser on Android platform;
- android - OK android app;
- iosweb - mobile browser on iOS platform;
- ios - OK iOS app;
- mobweb - all other cases
|Custom parameters transmitted when the user opens a custom link in a friend’s news feed, accepts a friend’s offer or reviews a notification from a friend
|1, if its a new install
|The name of a mobile widget’s title to be shown on application’s pages
|Authorized user ID that is constant
|Referrer for replace. For interaction between users, it is a friend’s ID
|Application launch method (see below)
|User session key
|User session secret key
|MD5 hash-sum of the current request and application_secret_key
|Odnoklassniki’s web server address
|Is there an active promo to show before game launch
|Is new signature format used
|User location according to his IP address
Application launching methods
|Direct link (https://ok.ru/games/[short-name])
|From any place in the application catalog or the user’s applications (outdated)
|From a banner in the application catalog
|From a banner (banner text)
|From a banner (banner image)
|The user accepted a friend’s invitation
|From a post in a friend’s news feed
|From a notification in the toolbar
|From a present
|From a present (tooltip)
|“Applications you have in common with your friend”
|From the catalog: my applications
|From the catalog: friend’s applications
|From the catalog: recommended applications
|From the catalog: new applications
|From the catalog: top applications
|From the catalog: pay attention
|From the catalog: application search
|From the catalog: shops & services
|From the catalog: our applications
|From the catalog: entertainment
|From the topical collection of applications
|From the catalog: recommended by genre
|Link under the user’s avatar. Appears if the user joins the application
Full refplaces list - ApplicationReferencePlace.
For some launch methods there is also an option with the “passive_” prefix.
The difference between passive and standard methods is the part of UI the user has launched the game from. The non-passive option is a notification, recommendation, etc. that pops up regardless of the user’s actions, whereas the passive one is the case when the element is not specially marked for the user and is launched in the standard way.