Odnoklassniki (OK.ru) Authentication Integration for 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 (OK.ru) Authentication Integration for Mobile App
Simple
~1 business day
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

Developing Odnoklassniki Authorization

Odnoklassniki (OK.ru) authorization — OAuth2 over proprietary API. The audience is specific: 35+ years old, actively uses the Odnoklassniki mobile app. If your product targets this demographic or integrates with the social network (games, contests, UGC) — integration is justified.

SDK and setup

OK provides OKiOS SDK (CocoaPods: pod 'OKiOS') and OK Android SDK (Gradle: implementation 'ru.ok.android:sdk:latest'). The SDK is arranged similarly to VK: if the OK app is present on the device — authorization through it without password entry, otherwise — browser OAuth2.

App registration on apiok.ru, we get application_id, application_key, application_secret_key. Three keys — typical confusion. application_key is used when signing requests to the API, application_secret_key — server-side, never in the client.

On iOS URL Scheme: ok{application_id}. In AppDelegate — [OKSDK handleOpenURL:url].

After authorization we get access_token and refresh_token. OK tokens have limited TTL (usually 30 days), refresh is mandatory.

Requests to OK API

A peculiarity of OK API — mandatory request signing. Request parameters are sorted alphabetically, concatenated, an MD5 of access_token + application_secret_key is added to the string, then MD5 of the entire string. Without correct signature — PARAM_SIGNATURE_INVALID error.

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

This logic — on the server side. The mobile client passes access_token to the backend, the backend makes signed requests to OK API.

Profile method: users.getCurrentUser with fields name,pic_3,email. Email in OK — optional field, user may not have specified it.

Server token verification: users.getLoggedInUser?access_token={token} — returns user uid if token is valid.

Timeframe: 3–6 business days. Non-standard API signature complicates the server side compared to classic OAuth2 providers.