Provider – VKontakte

VK Sample

Table of contents

How to enable VKontakte login in WordPress

1. Create VKontakte App

  1. Navigate to https://vk.com/apps?act=manage
  2. Log in with your VK credentials if you are not logged in.
  3. Locate the blue “Create app” button and click on it.
  4. Enter the Title for your App and select “Website” as platform.
  5. Into the “Website address” field enter the URL of your homepage
  6. Fill the “Base domain” field with your domain name.
  7. When all fields are filled, click the “Upload app” button.
  8. Fill the information form of your app, upload an app icon then click Save.
  9. Pick Settings at the left-hand menu
  10. Into the “Authorized redirect URI” field add the URL that Nextend Social Login suggests at the backend.
  11. Save your app
  12. Find the necessary “App ID” and “Secure key” at the top of the Settings page where you just hit the save button.

2. App setup

Once your VKontakte app is ready you’ll need to copy and paste the Application ID and Secure key to the VKontakte provider’s Settings tab. You can find the information at your VKontakte app’s Settings which you can reach from the left sidebar.

3. Verifying

Once your Application ID and Secure key has been added you need to verify the setup first. This verification helps you identify possible problems with the app.

Settings

VK Provider Configuration

Application ID

The Application ID of your VKontakte app. You can find it at your App → left menu: Settings.

Secure key

The Secure key of your VKontakte app. You can find it at your App → left menu: Settings.

Username prefix on register

Whenever a new user registers with their VKontakte account they can get a custom prefix so you can easily identify them.

Fallback username prefix on register

Whenever a new user registers with their VKontakte account and we can not generate a valid username from the first name or last name, a random username will be generated. With this option they can get a custom prefix so you can easily identify them.

Terms and conditions

This option can only be seen, if Terms and conditions is set to Show in Global Settings → Privacy tab. Here you can set custom Terms and Conditions for users who register with VKontakte. For more information please read our GDPR documentation.

Common error messages returned by VKontakte during verification

redirect_uri has wrong domain

{“error”:”invalid_request”,”error_description”:”redirect_uri has wrong domain, check application settings”}

The problem is that the entered Base domain field is not correct for your app. Check the 6th step of the App setup to fix the problem.

redirect_uri is incorrect

{“error”:”invalid_request”,”error_description”:”redirect_uri is incorrect, check application redirect uri in the settings page”}

The problem is that the entered Authorized redirect URI field is not correct for your app. Check the 11th step of the App setup to fix the problem.

client_id is incorrect

{“error”:”invalid_client”,”error_description”:”client_id is incorrect”}

The entered Application ID is not correct. Maybe the app with the entered ID was deleted. Go to the VKontakte provider → Settings and make sure that an existing App’s Application Id and Secure key was entered.

client_secret is incorrect

Error: invalid_client: client_secret is incorrect

The Secure key you copied from the VKontakte app is invalid. Make sure the correct one was copied.