I am converting a PHP application to access Google calendar to Go. I used this step by step to get started.
All went smoothly, but when I run quickstart.go
, I get the following error:
Unable to parse client secret file to config: oauth2/google: missing redirect URL in the client_credentials.json exit status 1
Content of the client_secret.json
is:
{
"installed":{
"client_id":"***********content.com",
"project_id":"*******",
"auth_uri":"https://accounts.google.com/o/oauth2/auth",
"token_uri":"https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs"
}
}
That client_secret.json
file is located at the root of my GOPATH as instructed in the step by step
I already have aOAuth 2.0 client ID
for my PHP app that works just fine in PHP. I just want to use that one in the a new Go application to access multiple user calendars, but when I download the json file attached to that ID, I am getting the error above. Maybe the quickstart.go
is not meant for that usage.
Any hints?