VKontakte signs users in with their VK account, the dominant consumer social network in Russian-speaking markets.

## Copy the redirect URI

In the [Authdog console](https://console.authdog.com), select the project and environment, open **Authentication > Providers**, find **VKontakte**, and click **Enable**. Copy the redirect URI shown in the form:

```url
https://identity.authdog.com/api/v1/callback/<connectionId>
```

## Create the application

1. Open [VK for Developers](https://dev.vk.com/) and create an application of type **Website**.
2. Set the site address and the **Authorized redirect URI** to the redirect URI from Authdog.
3. Copy the **Application ID** and the **Secure key**.

## Configure Authdog

| Field | Value |
| --- | --- |
| **Client ID** | The VK **Application ID** |
| **Client Secret** | The VK **Secure key** |

Save, then toggle the connection **active**.

## What VKontakte returns

Authdog requests the `email` scope and reads the profile from `https://api.vk.com/method/users.get`.

The users endpoint returns the numeric VK id, first and last name, and avatar. The email arrives with the token response rather than the profile call.

VK requires the application to be published before users outside the app's admins can authorize it.

## Test it

1. Open your environment's hosted sign-in page, or link to `https://identity.authdog.com/api/v1/signin/<connectionId>`.
2. Select the VKontakte button and complete the flow.
3. Confirm the user appears under **Users** in the console with a VKontakte identity linked.

## Troubleshooting

| Symptom | Cause |
| --- | --- |
| `redirect_uri is incorrect` | The URI is missing from the app's authorized list |
| Only admins can sign in | The VK application is unpublished |
| Redirect or callback URL error | The URI registered with the provider does not match Authdog's exactly |
| Works in one environment only | Each environment has its own `connectionId`, and so its own redirect URI to register |

## Related

| Read | To learn how to |
| --- | --- |
| [Connectors](/docs/connectors) | Set up any other social provider |
