pythondjangopython-social-authvk

I want to authorize through vk.com with using python-social-auth and get error with redirect uri


Error

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

settings.py

AUTHENTICATION_BACKENDS = (
    'social.backends.vk.VKOAuth2',
    'django.contrib.auth.backends.ModelBackend',
)
SOCIAL_AUTH_VK_OAUTH2_KEY = '****'
SOCIAL_AUTH_VK_OAUTH2_SECRET = '*****'

On vk.com http://127.0.0.1:8000/complete/vk-oauth2 as redirect URI


Solution

  • I see network request and in it was param redirect_uri:

    http://localhost:8000/complete/vk-oauth2/.

    I paste it in redirect uri on vk.com. And authorizing is ended successfully. To see request press f12 and go to tab network (in Firefox).