"Security Error" when Connectin VK #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I see the following error when trying to connect VK:
{"error":"invalid_request","error_description":"Security Error"}
url: https://oauth.vk.com/authorize?client_id=&response_type=code&redirect_uri=https://evosync.ru/vk/callback&scope=market%20groups%20offline&state=2xUlEkQqbXHFxIg4jxqE40QzEMXoExdVcXjt7ekbDbU&display=page&v=5.131.
User needs to obtain access key for his community https://dev.vk.com/ru/api/access-token/getting-started#%D0%9A%D0%BB%D1%8E%D1%87%20%D0%B4%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%B0%20%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D1%81%D1%82%D0%B2%D0%B0.
Fixed in commit
debb2ef.Root cause: VK OAuth flow returns a personal user token, but VK Market API requires a community access token. Personal tokens trigger the "Security Error" on the OAuth authorize page when the app requests market/groups scopes.
Changes:
web/routes/vk.py— removed OAuth flow (/vk/connect,/vk/callback); addedPOST /vk/tokenfor manual community token entry; validates token viagroups.getByIdand stores community name/IDweb/templates/vk.html— replaced OAuth button with manual token form and step-by-step instructions (Settings → Work with API → create key with market + community management permissions)web/health_checker.py— updatedcheck_vk_connectionto usegroups.getByIdinstead ofusers.get(personal tokens no longer used)https://evosync.ru/vk/connect:
{"detail":"Not Found"}