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

Invalid request: versions below 5.81 are deprecated #47

Open
aprezvykh opened this issue Dec 26, 2021 · 1 comment
Open

Invalid request: versions below 5.81 are deprecated #47

aprezvykh opened this issue Dec 26, 2021 · 1 comment

Comments

@aprezvykh
Copy link

aprezvykh commented Dec 26, 2021

Добрый день! Пытаюсь выполнить примерно вот такой код:

setAccessToken(access_token = 'xxxxxx')
vkR::getWallExecute(domain = 'overhear_berdsk', v = '5.81')

на что мне возвращает ошибку:
Error in vk_stop(message = response$error$error_msg, error_code = response$error$error_code): Invalid request: versions below 5.81 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
Traceback:

  1. vkR::getWallExecute(domain = "overhear_berdsk", v = "5.131")
  2. execute(code)
  3. try_handle_error(response)
  4. tryCatch(vk_stop(message = response$error$error_msg, error_code = response$error$error_code),
    . vk_error14 = function(e) {
    . params <- handle_captcha(response$error)
    . return(repeat_last_query(params = params, n = 6))
    . }, vk_error17 = function(e) {
    . handle_validation(response$error)
    . return(repeat_last_query(n = 6))
    . }, vk_error6 = function(e) {
    . request_delay()
    . return(repeat_last_query(n = 6))
    . })
  5. tryCatchList(expr, classes, parentenv, handlers)
  6. tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
    . names[nh], parentenv, handlers[[nh]])
  7. doTryCatch(return(expr), name, parentenv, handler)
  8. tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  9. tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
    . names[nh], parentenv, handlers[[nh]])
  10. doTryCatch(return(expr), name, parentenv, handler)
  11. tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  12. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  13. doTryCatch(return(expr), name, parentenv, handler)
  14. vk_stop(message = response$error$error_msg, error_code = response$error$error_code)

Пробовал не ставить параметр v, и ставить разные цифры туда. Подскажите, пожалуйста, как я могу исправить проблему? Спасибо!

@yurasik2000
Copy link

@aprezvykh
В пакете по умолчанию захардкоджена версия API 5.73. Можно перед началом вызова методов API ее изменить функцией:
setAPIVersion('5.81')

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