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.
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"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With