library(googleAuthR) library(jsonlite) options("googleAuthR.client_id" = "XX") options("googleAuthR.client_secret" = "JXX") gar_auth() url <-'https://indexing.googleapis.com/v3/urlNotifications:publish' postAPI <- POST(url, content_type("application/json"), add_headers(list("Authorization" = "Bearer XX")), body = list( url = 'XX', type = "URL_UPDATED" ), encode = c("json"))