Application

To get application ID and keys, it should be created according to the 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).

Application parameters

Parameters listed below are transmitted to applications that are opened in iframe:

  • as request parameters for HTML applications
  • as flashvars for Flash applications
ParameterRequiredTypeDescription
logged_user_idYesLongAuthorized user ID that is constant
api_serverYesStringMain URL of API server, for example: https://api.ok.ru/
application_keyYesStringApplication public key
session_keyYesStringUser session key
session_secret_keyYesStringUser session secret key
authorizedYesNumber1 if the user has authorized the application; otherwise 0
apiconnectionYesStringConnection name
refplaceNoStringApplication launching method (see below)
refererNoStringReferer for replace. For interaction between users, it is a friend’s ID
auth_sigYesStringMD5 hash of user+session_key+application_secret_key parameters. Can be used for easier checking of a logged in user
sigYesStringMD5 hash of the current request and application_secret_key
custom_argsNoStringCustom 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
containerNoBooleanWill be passed as true, if a mobile_html application is opened inside the native application
header_widgetNoStringThe name of the title of a mobile widget that should be shown on application pages

Application launching methods

refplaceDescription
directDirect link (https://ok.ru/games/[short-name])
catalogFrom any place in the application catalog or the user’s applications (outdated)
bannerFrom a banner in the application catalog
banner_textFrom a banner (banner text)
banner_imgFrom a banner (banner image)
friend_invitationThe user accepted a friend’s invitation
friend_feedFrom a post in a friend’s news feed
friend_notificationFrom a notification in the toolbar
presentFrom a present
present_tooltipFrom a present (tooltip)
common_apps“Applications you have in common with your friend”
user_appsFrom the catalog: my applications
friend_appsFrom the catalog: friend’s applications
recommended_appsFrom the catalog: recommended applications
new_appsFrom the catalog: new applications
top_appsFrom the catalog: top applications
pay_attention_appsFrom the catalog: pay attention
app_search_appsFrom the catalog: application search
shops_catalog_appsFrom the catalog: shops & services
our_appsFrom the catalog: our applications
short_appsFrom the catalog: entertainment
app_presetFrom the topical collection of applications
showcase_appsFrom the catalog: recommended by genre
rb_9Link under the user’s avatar. Appears if the user joins the application

For some launching methods there is also an option with the passive_ prefix.

The difference between passive and standard is in 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.

For example:

passive_friend_suggest

friend_suggest