MarkEdmondson1234 / searchConsoleR

R interface with Google Search Console API v3, including Search Analytics.
http://code.markedmondson.me/searchConsoleR/
Other
114 stars 41 forks source link

I receive Error 400 msg #40

Open tomkenig opened 6 years ago

tomkenig commented 6 years ago

Hi Mark,

What goes wrong

when I try to execute Your code, I receive error like this:

service_token <-gar_auth_service("C:/token/WWW/gog_webmaster/POLISH_ALL/my_file.json") Error in init_oauth_service_account(self$secrets, scope = self$params$scope, : Bad Request (HTTP 400).

Do You know what kind of problem is it?

When creating sevice account, i need to choose account role. Maybe this is couse of my problem. What role I need to choose?

Actual output

service_token <-gar_auth_service("C:/token/WWW/gog_webmaster/POLISH_ALL/my_file.json") Error in init_oauth_service_account(self$secrets, scope = self$params$scope, : Bad Request (HTTP 400).

Session Info

R version 3.4.4 (2018-03-15) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=Polish_Poland.1250 LC_CTYPE=Polish_Poland.1250 LC_MONETARY=Polish_Poland.1250 [4] LC_NUMERIC=C LC_TIME=Polish_Poland.1250

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] searchConsoleR_0.3.0 googleAuthR_0.6.2

loaded via a namespace (and not attached): [1] httr_1.3.1 compiler_3.4.4 R6_2.2.2 assertthat_0.2.0 tools_3.4.4 curl_3.1
[7] memoise_1.1.0 jsonlite_1.5 digest_0.6.13 openssl_1.0

MarkEdmondson1234 commented 6 years ago

Could you paste the URL it tries to authenticate with? That will hold the parameters and give a clue to what is missing. Perhaps scopes?

tomkenig commented 6 years ago

ok, below:

set website to your URL including http://

website <- "https://tomaszkenig.pl"