Closed zhangrz2023 closed 1 year ago
I already have a solution for this, a quick fix and merge is requested.
In the code: api_logout <- function(RH) {
detail <- paste("?client_id=", RH$api_request.client_id, "&token=", RH$tokens.refresh_token, sep = "")
url <- paste(RobinHood::api_endpoints("revoke_token"), detail, sep = "")
dta <- httr::POST(url) httr::stop_for_status(dta)
dta <- dta %>% content(type = "json") %>% rawToChar()
return(dta)
}
replace "RH$tokens.refresh_token" with "RH$api_response.refresh_token" should resolve the issue.
It seems the api_logout() is referencing the wrong object in the inputted RobinHood object. Request correction.