ElioRubens
ElioRubens

Reputation: 701

client_secret.json is empty upon download from google developer site

I am trying to download the client_secret.json from google API. I am following the steps listed in https://developers.google.com/gmail/api/quickstart/ruby.

The client_secret.json file does download but it is empty. The title of the file looks like it must be the client_id ending in apps.googleusercontent.com however there is no data stored inside the file.

Upvotes: 7

Views: 2305

Answers (2)

ND003
ND003

Reputation: 802

The issue seems to be resolved now, as I can download them properly.

Upvotes: 0

Eric
Eric

Reputation: 93

I assume this just pre-populates the json for you. If you check out API Client Library for Ruby (Alpha) - Client Secrets, you should be able to manually create it with the information on the same page that offers the "DOWNLOAD JSON" button.

Although this says it is for Ruby, I don't think the json format would be any different for other languages.

Here is a snippet of the example from the above Google Reference URL:

Here is an example client_secrets.json file for a web application:

{
  "web": {
    "client_id": "asdfjasdljfasdkjf",
    "client_secret": "1912308409123890",
    "redirect_uris": ["https://www.example.com/oauth2callback"],
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://accounts.google.com/o/oauth2/token"
  }
}

Here is an example client_secrets.json file for an installed application:

{
  "installed": {
    "client_id": "837647042410-75ifg...usercontent.com",
    "client_secret":"asdlkfjaskd",
    "redirect_uris": ["http://localhost", "urn:ietf:wg:oauth:2.0:oob"],
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://accounts.google.com/o/oauth2/token"
  }
}

Upvotes: 5

Related Questions