Odnoklassniki API Social Network Integration into Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Odnoklassniki API Social Network Integration into Mobile App
Simple
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Integrating Odnoklassniki API in a Mobile Application

Odnoklassniki (OK.ru) is the second-largest Russian-speaking social network. Audience skews 35+, relevant for retail, media, family services apps. API called OK API, standard OAuth flow, but request signing differs from VKontakte.

App Registration and Keys

Register on dev.ok.ru, get three keys: application_id, application_key (public), application_secret_key (private, server-only). App type—"Mobile."

Authorization: OAuth 2.0 + Request Signing

Authorize via WebView or system browser:

https://connect.ok.ru/oauth/authorize
  ?client_id=YOUR_APP_ID
  &scope=GET_EMAIL;VALUABLE_ACCESS;PHOTO_CONTENT
  &response_type=code
  &redirect_uri=yourapp://oauth

After receiving code—exchange for access_token via POST to https://api.ok.ru/oauth/token.do.

Request Signing

Key difference from OK API. Each request is signed:

sig = MD5(params_sorted_alphabetically + MD5(access_token + application_secret_key))

Steps:

  1. Take all request params except sig and access_token.
  2. Sort by param name, concatenate to string key=value.
  3. Calculate session_secret = MD5(access_token + application_secret_key)—server-side, secret not to client.
  4. sig = MD5(params_string + session_secret).

Never send application_secret_key to client—through backend proxy only. Architecture: client requests your backend → backend adds signature → proxies request to OK API.

OK SDK for Mobile

iOS: OKLoginSDK via CocoaPods or SPM (unofficial). No official maintained Swift SDK—usually implement OAuth flow manually via ASWebAuthenticationSession.

Android: Official ok-android-sdk on GitHub. Gradle:

implementation 'ru.ok.android:sdk:3.0.18'

Authorization:

OkAuthManager.startOkAutoExternal(activity, listOf(OkScope.GET_EMAIL, OkScope.VALUABLE_ACCESS))
// In onActivityResult:
val token = OkAuthManager.onActivityResult(requestCode, resultCode, data, listener)

Getting User Data

GET https://api.ok.ru/fb.do
  ?method=users.getCurrentUser
  &fields=NAME,PIC_1,LOCATION,EMAIL,GENDER
  &access_token=...
  &application_key=...
  &sig=...
  &format=json

Profile fields differ from VK: NAME—name, LAST_NAME—last name, PIC_1—50x50 avatar, PIC_3—128x128 avatar. Email returned only with GET_EMAIL scope and if user entered it.

Publishing to OK

Scope VALUABLE_ACCESS required for publishing. Publish via mediatopic.post:

POST https://api.ok.ru/fb.do
method=mediatopic.post
&type=USER_STATUS
&attachment={"media":[{"type":"text","text":"Post text"}]}

For publishing with photo: upload via photosV2.getUploadUrl, then use photo token in attachment.

Errors

  • PARAM_SESSION_EXPIRED—token expired. OK tokens live 30-60 days, refresh token—longer.
  • PERMISSION_DENIED—insufficient scope.
  • SERVICE_UNAVAILABLE—API temporarily unavailable, retry with exponential backoff.

Timeline

OK authorization + profile import with backend signature proxy: 2–3 days. Publishing with media: +1 day. Pricing calculated individually.