Publishing widget

For external sites and native mobile applications Odnoklassniki provide a specific mechanism for publishing in the user notes or into a group’s feed (only if a user has permission to post to a specific group).

To use this widget application must be approved. Send approve request to

Publishing a user note

For publishing you should open browser window (or iframe) with a specially crafted URL:{application_id}&st.attachment={attachment_json}&st.signature={signature}&st.return={return_url}&st.popup={popup}&st.silent={silent}&st.utext={text}

The values of all URL arguments must be encoded.

st.appYesApplication id
st.attachmentYesJson with mediatopic information. This parameter can be base64-encoded
st.signatureYesQuery signature
st.returnNoOn this URL user will be redirected with publication result. If is empty - result of the publication will be sent via HTML5 postMessage
st.popupNoPerform automatic centering and fit the windows size.
Possible values: on/off (default)
st.silentNoClose window after publishing. Ignored if st.return is specified.
Possible values: on/off (default)
st.utextNoAllow user to add custom comment.
Possible values: on/off (default)
st.access_tokenNoIn case of OAuth authorization - valid access_token
st.groupIdNoIf you intend to publish a topic to group, group id ,ust be passed with this paramater

Publishing topic to a group

Group topic publishing works just as user note publishing. You need to open a browser window (or iframe) with a specific URL:{application_id}&st.groupId={group_id}&st.attachment={attachment_json}&st.signature={signature}&st.return={return_url}&st.popup={popup}&st.silent={silent}&st.utext={text}

All parameters are the same, but st.groupId parameter is required to be passed if you need to publish a post to a group.

Also it is required for user to have a permission to publish posts into a group (i.e. he needs to be a group moderator or user created posts should be enabled in this group’s settings).

Query signature st.signature

If st.access_token is not empty secretKey is session_secret_key, in the other case secretKey is an application secret key.
Values must not be encoded.

If st.return isn’t empty:

md5("st.attachment=" + attachment + "st.return=" + return_url + secretKey);

If st.return is empty:

md5("st.attachment=" + attachment + secretKey);


Topic creation result depends on whether parameter st.return was or was not specified.

If topic was created without using of st.return parameter, the answer would be the following:


If 0 is return instead of a topic id, it means that your application needs to be approved. To get an approve for your application please send an email to

When st.return is specified and topic is successfully created, you will get the following result:


Result parameters are:

  • type - flag identifying if a topic was created successfully or the process ended with an error. Possible values: success, error;
  • id - created topic id;
  • signature - signature to validate the response on your side;
  • code - error code that was invoked during topic creation process, only present in response if type=error;
  • message - additional error information, only present in response if type=error.

Signature parameter can be calculated by this formula:

md5("id=" + id + secretKey);