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).

Application parameters

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.
api_serverYesStringMain URL of API server, for example:
apiconnectionYesStringConnection name
application_keyYesStringApplication public key
auth_sigYesStringMD5 hash-sum of logged_user_id+session_key+application_secret_key parameters. Can be used for easier checking of a logged in user
authorizedYesNumber1 if the user has authorized the application; otherwise 0
containerNoBooleanWill be passed as true, if application was launched within native application or iframe (no extra heading from widget.getWidgetContent is required)
mobNoBooleanWill be passed as true, if application was launched on mobile)
mob_platformNoStringMobile platform on which game was launched. Passed to game only if parameter mob is true.
Possible values:
    - 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_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
first_startNoNumber1, if its a new install
header_widgetNoStringThe name of a mobile widget’s title to be shown on application’s pages
logged_user_idYesLongAuthorized user ID that is constant
refererNoStringReferrer for replace. For interaction between users, it is a friend’s ID
refplaceNoStringApplication launch method (see below)
session_keyYesStringUser session key
session_secret_keyYesStringUser session secret key
sigYesStringMD5 hash-sum of the current request and application_secret_key
web_serverNoStringOdnoklassniki’s web server address
payment_promo_activeNoBooleanIs there an active promo to show before game launch
new_sigNoBooleanIs new signature format used
ip_geo_locationNoStringUser location according to his IP address

Application launching methods

directDirect link ([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

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.

For example: