Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current vk.com API version is deprecated, all requests are failing #108

Open
ARtoriouSs opened this issue Sep 14, 2020 · 2 comments
Open

Comments

@ARtoriouSs
Copy link
Contributor

ARtoriouSs commented Sep 14, 2020

vk.com API returns an error during callback because current API version in request (v5.8) is deprecated since 1st June 2020

Reproduction

Try authenticating with /auth/vk, after redirect to callback it fails with the fallowing error:

(FunctionClauseError) no function clause matching in List.first/1

This happens because of current version deprecation, see the users.get API response:

%{      
  "error" => %{
    "error_code" => 8,
    "error_msg" => "Invalid request: versions below 5.21 are deprecated. Version param should be passed as \"v\". \"version\" param is invalid and not supported. For more information go to https://vk.com/dev/constant_version_updates",
    "request_params" => [
      %{
        "key" => "fields",
        "value" => "first_name,last_name,bdate,education,universities,domain,photo_400,photo_100"
      },
      %{"key" => "user_ids", "value" => "138555414"},
      %{"key" => "v", "value" => "5.8"},
      %{"key" => "method", "value" => "users.get"},
      %{"key" => "oauth", "value" => "1"}
    ]
  }
}

Fix

Updating to a newer version solves the problem, according to this doc the latest version is 5.124. According to changelog there are no critical changes to users.get, so I think the version can be safely updated. See #109

@ARtoriouSs
Copy link
Contributor Author

@sobolevn, thanks for accepting a PR! I think this issue can be closed now, but would you mind updating a Hex release? With the latest 0.3.1 version it will still fail on every request

@sobolevn
Copy link
Member

I guess this should 0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants