Send feedback Class GoogleClientSecrets (2.7.2) Stay organized with collections Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public final class GoogleClientSecrets extends GenericJson
OAuth 2.0 client secrets JSON model as specified in client_secrets.json file format .
Sample usage:
static GoogleClientSecrets loadClientSecretsResource ( JsonFactory jsonFactory ) throws IOException { return GoogleClientSecrets . load ( jsonFactory , new InputStreamReader ( SampleClass . class . getResourceAsStream ( "/client_secrets.json" ), "UTF-8" ) ); }
Inheritance Object > java.util.AbstractMap > com.google.api.client.util.GenericData > com.google.api.client.json.GenericJson > GoogleClientSecrets Inherited Members com.google.api.client.json.GenericJson.clone()
com.google.api.client.json.GenericJson.getFactory()
com.google.api.client.json.GenericJson.set(java.lang.String,java.lang.Object)
com.google.api.client.json.GenericJson.setFactory(com.google.api.client.json.JsonFactory)
com.google.api.client.json.GenericJson.toPrettyString()
com.google.api.client.json.GenericJson.toString()
com.google.api.client.util.GenericData.entrySet()
com.google.api.client.util.GenericData.equals(java.lang.Object)
com.google.api.client.util.GenericData.get(java.lang.Object)
com.google.api.client.util.GenericData.getClassInfo()
com.google.api.client.util.GenericData.getUnknownKeys()
com.google.api.client.util.GenericData.hashCode()
com.google.api.client.util.GenericData.put(java.lang.String,java.lang.Object)
com.google.api.client.util.GenericData.putAll(java.util.Map<? extends java.lang.String,?>)
com.google.api.client.util.GenericData.remove(java.lang.Object)
com.google.api.client.util.GenericData.setUnknownKeys(java.util.Map<java.lang.String,java.lang.Object>)
Static Methods load(JsonFactory jsonFactory, Reader reader)
public static GoogleClientSecrets load ( JsonFactory jsonFactory , Reader reader )
Loads the client_secrets.json
file from the given reader.
Parameters Name Description jsonFactory
com.google.api.client.json.JsonFactory
reader
Reader
Constructors GoogleClientSecrets()
public GoogleClientSecrets ()
Methods clone()
public GoogleClientSecrets clone ()
Overrides com.google.api.client.json.GenericJson.clone()
getDetails()
public GoogleClientSecrets . Details getDetails ()
Returns the details for either installed or web applications.
getInstalled()
public GoogleClientSecrets . Details getInstalled ()
Returns the details for installed applications.
getWeb()
public GoogleClientSecrets . Details getWeb ()
Returns the details for web applications.
set(String fieldName, Object value)
public GoogleClientSecrets set ( String fieldName , Object value )
Overrides com.google.api.client.json.GenericJson.set(java.lang.String,java.lang.Object)
setInstalled(GoogleClientSecrets.Details installed)
public GoogleClientSecrets setInstalled ( GoogleClientSecrets . Details installed )
Sets the details for installed applications.
setWeb(GoogleClientSecrets.Details web)
public GoogleClientSecrets setWeb ( GoogleClientSecrets . Details web )
Sets the details for web applications.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-17 UTC.
Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[],[]]