Error when getting list_unsampled_reports using RGA - r

I am using the RGA package to connect R and Google Analytics: http://cran.r-project.org/web/packages/RGA/RGA.pdf
I am trying to get the list of unsampled reports created for a view using:
list_unsampled_reports(account.id, webproperty.id, profile.id,
start.index = NULL, max.results = NULL, token)
It prompts the following error:
"Error: client error: (400) Bad Request
reason message locationType location
1 invalid parameter Invalid field selection segmentId parameter fields"
Can anyone advise?

Client Login is deprecated, you should use OAuth 2.0.
There is a recently updated Hello Analytics API tutorial that should guide you through the steps to get your application working.

The error is caused by a bug when specifying fields in the request to API (segmentId instead webPropertyId). This bug is already fixed.

Related

httr::oauth1.0_token returns HTTP 403

I tried to use httr::oauth1.0_token to authenticate against Twitter, but I got an error:
library(httr)
oauth1.0_token(oauth_endpoints("twitter"),
oauth_app("tw", key = Sys.getenv("Twitter_API"),
secret = Sys.getenv("Twitter_Key")))
# Error in init_oauth1.0(self$endpoint, self$app, permission = self$params$permission, :
# Forbidden (HTTP 403).
As I am new to OAuth authentication, I started reading the Twitter Docs and built the authentication dance from scratch.
After a lot of trial and error, I was eventually successful, so I can rule out that something on the twitter app setting end is wrong (that is the endpoint is set up correctly and especially the callback URL is defined properly, furthermore key and secret are the correct ones).
Before filing a bug report, I wanted to double check that I am using oauth1.0_token correctly. Thus, is this a bug or am I the bug?

Error message returned by Google Maps API can be read?

I am currently in need of either having the ability to read a line from a Console in Rstudio whenever the Google Maps API prompted an error message. Is there any ways for me to either do that or match certain string with the error message returned by Google Maps API via the usage of sum(str_detect([certain substring], [error message by Google Maps]))>0 OR grepl([certain substring], [error message by Google Maps], fixed = TRUE) combined with tryCatch...error?

Firebase console create dynamic link error

I'm trying to create a dynamic link in the firebase web console but I'm getting this error:
An error occurred when creating a new Dynamic Link
If I inspect in the developer console I can see this error.
{code: 400, message: "Request contains an invalid argument.", status: "INVALID_ARGUMENT"}
You need to include the deep link you're trying to add to your Whitelist URL patterns. That will fix the issue.

FIRAuthInternalErrorDomain when trying to login with Google

I've setup Google login in my Firebase app (I'm using the new Firebase console), but each time I try with Google, I get the following error:
#<NSError:0x11f0625a0, description="An internal error has occurred, print and inspect the error details for more information.", code=17999, domain="FIRAuthErrorDomain", userInfo={"NSUnderlyingError"=>#<NSError:0x122278130, description="The operation couldn’t be completed. (FIRAuthInternalErrorDomain error 3.)", code=3, domain="FIRAuthInternalErrorDomain", userInfo={"FIRAuthErrorUserInfoDeserializedResponseKey"=>{"message"=>"", "errors"=>[{"reason"=>"invalid", "message"=>"", "domain"=>"global"}], "code"=>400}}>, "error_name"=>"ERROR_INTERNAL_ERROR", "NSLocalizedDescription"=>"An internal error has occurred, print and inspect the error details for more information."}>
I don't really know where yo go from here, since there's no message in the message field. Any guesses on what this could be?
I've recently migrated to the new version of Firebase btw. I'm using the new SDK in my iOS app. Furthermore, I setup Google authentication a week before I migrated. I'm not sure if any keys have been overwritten in the migration. How do I check if I have the right keys in my console vs my GoogleService plist file?

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)

Resources