vkR icon indicating copy to clipboard operation
vkR copied to clipboard

Invalid request: versions below 5.81 are deprecated

Open aprezvykh opened this issue 2 years ago • 1 comments

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

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, и ставить разные цифры туда. Подскажите, пожалуйста, как я могу исправить проблему? Спасибо!

aprezvykh avatar Dec 26 '21 09:12 aprezvykh

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

yurasik2000 avatar Apr 30 '22 14:04 yurasik2000