I have downloaded the credentials and they work well with the Google Actions Test suite.
I tried this code but I'm getting 2020/06/02 01:58:56 Get ...: unsupported protocol scheme ""
Often these errors seem to arise due to incorrect token URLs. My configured URI is https://oauth2.googleapis.com/token which conforms as stated here.
To confirm the scheme I replaced ("...") above with the actual URL,
response, err := client.Get("https://oauth2.googleapis.com/token")
It resulted in the below error,
&{404 Not Found 404 HTTP/2.0 2 0 map[Alt-Svc:[h3-27=":443"; ma=2592000,h3-25=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"] Content-Length:[0] Content-Type:[text/html] Date:[Tue, 02 Jun 2020 18:43:01 GMT] Server:[scaffolding on HTTPServer2] X-Content-Type-Options:[nosniff] X-Frame-Options:[SAMEORIGIN] X-Xss-Protection:[0]] {0xc0002a6280} 0 [] false false map[] 0xc00011e300 0xc0000b2370}
Snippet from the JSON file -"token_uri": "https://oauth2.googleapis.com/token", Tried printing the client before the Get call and it did print the correct URL too.
I know possibly this isn't the apt place for this question
I want to get the Oauth token from the GCP client credentials. Reference
Works well with
oauth2l fetch --credentials ~/Downloads/esp-rainmaker-97663-2f539a842d10.json --scope https://www.googleapis.com/auth/homegraph
When I try with the Golang API, I get the following error.
I have downloaded the credentials and they work well with the Google Actions Test suite. I tried this code but I'm getting
2020/06/02 01:58:56 Get ...: unsupported protocol scheme ""
Often these errors seem to arise due to incorrect token URLs. My configured URI is
https://oauth2.googleapis.com/token
which conforms as stated here.To confirm the scheme I replaced ("...") above with the actual URL, response, err := client.Get("https://oauth2.googleapis.com/token") It resulted in the below error,
Snippet from the JSON file -
"token_uri": "https://oauth2.googleapis.com/token",
Tried printing the client before the Get call and it did print the correct URL too.Is there something I could be missing?