ZendeskR Producing the following error when trying to connect to api - r

I am fairly new to using APIs and trying to use the zendesk API now through R using the ZendeskR package. I belive I have connected to it however I keep getting the following error whenever I try to query it.
Here is my code:
library(zendeskR)
library(rjson)
zendesk(username, password, url)
ticket <- getTicket('20150')
The username, password and url are all variables that I have assigned the correct values.
The following error that I get when I run it is this:
Error in function (type, msg, asError = TRUE) :
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Please help as I am unsure on what this error means or what I am doing wrong.
Thanks.

TLS v1.1 is no longer accepted by Zendesk, please use TLS v1.2.

Related

How Do I Connect to a Neo4J AuraDB Instance from R Studio

I created a Neo4j AuraDB database where I have dumped the movie recommendation dataset. I am able to start and connect to the instance in the cloud. However, when I try to connect to the instance via its API in R Studio, using the neo4r package and the following code
movieDB <- neo4j_api$new(
url = curl("neo4j+s://0cc45a14.production-orch-0054.neo4j.io:7687"),
user = "neo4j",
password = "password"
)
movieDB$ping()
I get the error message in my console Error: Could not resolve host: 7. Also, when I try to start a graph with the following code
graph <- startGraph(
url = curl("neo4j+s://0cc45a14.production-orch-0054.neo4j.io:7687"),
user = "neo4j",
password = "password"
)
I also get the following error message in my console
Error in function (type, msg, asError = TRUE) :
Could not resolve host: 8
I do not know why the error is happening, as I have previously connected to a Neo4j sandbox instance from within R Studio without any hassle. As always, I will appreciate your helpful suggestions. Thanks!
AuraDB requires a driver which supports the Bolt protocol. I do not know of any R driver that supports the protocol at the moment, they only support HTTP (and HTTP is not available yet in AuraDB).

Error in callAPI(query, token)

I had tried to access my FB token using the preliminary code shown by pablo over here :
https://github.com/pablobarbera/Rfacebook
However I get the following error message :
Error in callAPI(query, token) :
An active access token must be used to query information about the current user.
I used this code:
fb_oauth <- fbOAuth(app_id="14025", app_secret="5fdb6ef5776",extended_permissions = TRUE)
save(fb_oauth, file="fb_oauth")
load("fb_oauth")
I understand that I am not having access using my token despite authentication completion. Could someone please help.
Quick fix is just remove type = "application/x-www-form-urlencoded"
from fbOauth.R in RFacebook package. Because now Facebook returns response in JSON format.

TwitteR setup_twitter_oauth() gives an error

I am using twitteR package for the first time.
The setup_twitter_oauth function gives me an error:
[1] "Using browser based authentication"
Error in curl::curl_fetch_memory(url, handle = handle) :
Couldn't connect to server
or
[1] "Using browser based authentication" Error in
init_oauth1.0(self$endpoint, self$app, permission =
self$params$permission, : Bad Request (HTTP 400).
My code:
library(dplyr)
library(purrr)
library(twitteR)
setup_twitter_oauth(getOption("twitter_consumer_key"),
getOption("twitter_consumer_secret"),
getOption("twitter_access_token"),
getOption("twitter_access_token_secret"))
I am using Rstudio and Windows 7 with a proxy.
I believe the problem is that you're literally passing in those strings as arguments to setup_twitter_oath. They should be replaced by access tokens that Twitter gives you when you register your app.
You can assign the actual credentials to objects like
my_key, my_secret, my_access_token, my_access_secret
and then connect like this:
setup_twitter_oauth(my_key, my_secret, my_access_token, my_access_secret)
I noticed that if I try to connect with no credential or fake credentials that I get the same error you were experiencing from setup_twitter_oauth.
Make sure not to quote those objects or they're considered literal character strings.

Need to access Google Custom search api through R

How do I use R to do a Google Custom search? I have the custom search engine id and the api key. I currently try to do this:
getURL("https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=ENGINE_ID&q=searchterm")
and I get the following error:
Error in function (type, msg, asError = TRUE) : SSL certificate
problem: unable to get local issuer certificate
Though I am able to get the results in json when I do a get request in the browser. Any clue on whats happening?
httr package worked!!
library(httr)
query="https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=ENGINE_ID&q=SEARCH_TERM"
content(GET(query))
set ssl.verifypeer=TRUE in getURL
getURL("https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=ENGINE_ID&q=searchterm", ssl.verifypeer=TRUE)

R - Accesing Google Big Query with R. Authetication failed

I am trying to access Google Big Query with R, using the 'assertthat' and 'bigrquery' packages, following these instructions:
http://thinktostart.com/using-google-bigquery-with-r/#comment-22450
http://www.lunametrics.com/blog/2014/06/25/google-analytics-data-mining-bigquery-r/
The issue comes at the authentication step, I get directed to a code in the webbrowser, and when I paste the code in the terminal the following error appears:
Enter authorization code:
####CODE GOES HERE#####
Error en function (type, msg, asError = TRUE) :
Could not resolve host: accounts.google.com
I think that one possible issue is that we are behind a corporate firewall. While we do have access to the internet and I can install R packages, if I ping google.com from the terminal, I get an error. But I would like to know if any of you have found a solution to this kind of problem.
Thank you very much for reading this post. Any help is appreciated.
I found a solution to the issue. It was related to the corporate proxies. If I use the wifi for visitors I can run queries.

Resources