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

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).

Related

Connecting to Azure Data Lake by R using SAS Token

I am trying to connect to Azure DataLake Gen2 via R. I get from Azure DataLake administrator read access to given folder.
I have:
blob_service = 'https://DataLakeName.blob.core.windows.net'
data_lake_storage = 'https://DataLakeName.dfs.core.windows.net'
pathToFolder = 'path/to/folder/with/acess'
blob_sas_token = 'blobksastoken1232133210'
blob_sas_url = 'blob_service/pathToFolder?blob_sas_token'
Accoring to information about library AzureStor I tried:
library(AzureStor)
end_point <- blob_endpoint(endpoint = "https://DataLakeName.blob.core.windows.net/", sas = blob_sas_token)
list_blob_containers(end_point)
Unfortunately I got HTTP status code 500, what means probably an internal server error. Administratior said that token is correct and endpoint also works fine.
Error in process_storage_response(response,
match.arg(http_status_handler), : Internal Server Error (HTTP
500). Failed to complete Storage Services operation. Message:
InternalError Server encountered an internal error. Please try again
after some time.
Any idea what I am doing wrong, or how can I connect to ADL in other way using data that I have?

Error in Oauth2.0 authentication in R using HTTR (failed to connect: connection refused)

I am trying to create a simple app (in R) using GroupMe's API, which utilizes OAuth2.0. The documentation can be found here. However, I'm getting stuck on the first step of authentication/token generation for a user. See below for my code and the response I get:
access_key = ****
client_id = ****
gendpoint <- oauth_endpoint(
authorize = glue("https://oauth.groupme.com/oauth/login_dialog?client_id={client_id}"),
access = glue("http://localhost:1410/?access_token={access_key}")
)
gapp <- oauth_app(
"pingme",
key = client_id,
secret = access_key
)
t <- oauth2.0_token(
endpoint = gendpoint,
app = gapp
)
The above code is sufficient to bring in the login page, which presumably allows me to enter my credentials to obtain a token. However, when I enter my credentials, I get the following error message in R:
Authentication complete.
Error in curl::curl_fetch_memory(url, handle = handle) :
Failed to connect to localhost port 1410: Connection refused
So it looks like my authentication/login credentials worked, but somewhere an error prevented me from actually generating the token.
Could someone help me with this? This is my first time using the OAuth2.0 framework so I'm very confused. Thanks in advance!

Rgoogleads - Issue with Service Account

I am trying to migrate my RAdwords code to rgoogleads and keep bumping into the same authentication nightmare. Some context:
Use R in my local computer, but all deployments are in a remote server that runs shiny, RStudio and other goodies.
I have managed to successfully activate the service account. I am (almost) sure about it since I successfully connect to Google Ads with Python.
I tried the same code with local OAuth2.0 and it works fine. However when I try to do so with the ServiceAccount authentication I keep getting the same error. I am sure I am doing something wrong.
This is a sample of my code:
library(rgoogleads)
gads_auth(path='../serviceAccount.json')
gads_auth(email='my_email#company.com',
developer_token = '_my_dev_token_'
)
gads_set_login_customer_id('xxx-xxx-0524')
gads_get_accessible_customers()
And this is the response
<error/rlang_error>
Request had insufficient authentication scopes.
Backtrace:
1. rgoogleads::gads_get_accessible_customers()
2. gargle::response_process(ans, error_message = gads_check_errors2)
8. rgoogleads:::error_message(resp)
9. rgoogleads:::gads_abort(paste(client_id, msg))
10. cli::cli_abort(message = message, ..., .envir = .envir)
Even when I try gads_has_token() it returns TRUE (!)
Any clues? I can't seem to get my head around this.

web scraping with R in country which twitter is blocked

I am trying to extract some data with rtweet package in R. The problem is that twitter is blocked in Iran and I have to use a software to pass the filtering. Unfortunately, I am facing this error:
Error in curl::curl_fetch_memory(url, handle = handle) :
Failed to connect to api.twitter.com port 443: Connection refused
I am following regular steps for creating a token:
create_token(
app = "#######",
consumer_key = "#########",
consumer_secret = "############",
access_token = "#############",
access_secret = "############")
Do you have any idea?
Thanks,
Ok, I resolved the problem. Here we go: You should not use proxifiers! The best way is to use a VPN to change the whole path of internet on your system.

ZendeskR Producing the following error when trying to connect to api

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.

Resources