cordova/phonegap adapter for vksdk. This plogin is fork fixed with latest VK SDK.

Usage no npm install needed!

<script type="module">
  import cordovaVkAlt from '';


Cordova VK social network plugin

cordova/phonegap adapter for vksdk. This plogin is fork fixed with latest VK SDK.

You can use this plugin to authenticate user via VK application rather than via webview. It makes use of official VkSDKs for iOS and Android. This project is based on another github project . But Api was made a bit more generic to fit our needs.

Installation and Setup

First, you need to create VK application on developer page:


cordova plugin add cordova-vk-alt

Official VK documentation of how to setup and app is located here: . Fill in Fill in the "Batch name for Android", "Main Activity for Android" and "Certificate fingerprint for Android" fields. To generate fingerprint once android app is installed and running you can use VkSdk.getFingerPrintVkSdk method like this: VkSdk.getFingerPrintVkSdk(function(fpt) { alert(fpt); });


cordova plugin add cordova-vk-alt --variable VK_APP_ID=vk123456

Where vk123456 is unique identificator of your application, which you can see in your app settings: . Please note, that vk prefix should also be presented. This is needed to setup callback url scheme, so that VK application can open yours.

Sample usage

Upon your application startup you need to call VkSdk.init method with your APP id as an argument.


To initiate login process, you should call VkSdk.initiateLogin method:

VkSdk.initiateLogin(['photos', 'offline']);

As per SDKs' architecture receiving token is an event, rather than callback, you need to listen to vkSdk.newToken event to understand, when your user was logged in:

document.addEventListener('vkSdk.newToken', function(token) {
  console.log('New token is ' + token);

Important notes

Library is not complete. If you need bindings for some particular methods, create PRs or Issues. Thanks for your cooperation.