Geocode, error message, (google map, google_geocode, api)

1

I keep getting error messages when I try the below code, the error message is

"Error in open.connection(con, "rb") : schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted."

However it doesn't seem like my code is wrong, if the error message is due to the security or permission issue, can anyone give me the solution to remove those security issue?

library(googleway)   
res <- google_geocode(address = "대한민국 경기도 안산시 단원구 성곡동 강촌로", language = "ko", key = <your_api_key>)
r
api
google-maps
geocode
googleway
asked on Stack Overflow Apr 2, 2018 by AAA • edited Apr 2, 2018 by SymbolixAU

1 Answer

1

Solved, all right credits to @SymbolixAU

The issue is due to being behind a (company) firewall. In this case we need to use a curl_proxy

library(googleway)
library(curl)
curl_proxy <- function(url, verbose = TRUE){
  proxy <- ie_get_proxy_for_url(url)
  h <- new_handle(verbose = verbose, proxy = proxy)
  curl(url, handle = h)
}


res <- google_geocode(address = "대한민국 경기도 안산시 ", language = "ko", key =     "api_key", curl_proxy = curl_proxy)
answered on Stack Overflow Apr 2, 2018 by AAA

User contributions licensed under CC BY-SA 3.0