googleworkspace / go-samples

Go samples for Google Workspace APIs
Apache License 2.0
215 stars 100 forks source link

Unable to read client secret file: open credentials.json #18

Closed neymarsabin closed 5 years ago

neymarsabin commented 5 years ago

Expected Behavior

The first time you run the sample, it will prompt you to authorize access:

Browse to the provided URL in your web browser.

If you are not already logged into your Google account, you will be prompted to log in. If you are logged into multiple Google accounts, you will be asked to select one account to use for the authorization.

Click the Accept button. Copy the code you're given, paste it into the command-line prompt, and press Enter.

Actual Behavior

When I run go run quickstart.go, the error is Unable to read client secret file: open credentials.json.

Steps to Reproduce the Problem

  1. Write as described in the API developers documentation
  2. Run go run quickstart.go

Specifications

erickoledadevrel commented 5 years ago

Can you verify that the credentials.json file exists in your working directory?

erickoledadevrel commented 5 years ago

Closing due to inactivity.

jamesdouthit-wk commented 3 years ago

@erickoledadevrel I am having the exact same issue described and credentials.json does not in fact exist in my working directory. What creds do I need and where do I get them?

erickoledadevrel commented 3 years ago

I no longer work on this team, but if you look at the prerequisites section of the associated quickstart (example) it will point you in the right direction.