Beta
Implementations of this class will have all of the information necessary to create and install
the necessary handlers on an HttpTransport object to allow for a streamlined auth
experience.
Implementations of this interface should use the PersistenceCapable annotation to
allow credentials to be managed on behalf of the application.
[[["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-08-07 UTC."],[],[],null,["# Interface Credential (1.39.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.39.0 (latest)](/java/docs/reference/google-oauth-client/latest/com.google.api.client.extensions.auth.helpers.Credential)\n- [1.38.2](/java/docs/reference/google-oauth-client/1.38.2/com.google.api.client.extensions.auth.helpers.Credential)\n- [1.37.0](/java/docs/reference/google-oauth-client/1.37.0/com.google.api.client.extensions.auth.helpers.Credential)\n- [1.36.0](/java/docs/reference/google-oauth-client/1.36.0/com.google.api.client.extensions.auth.helpers.Credential)\n- [1.34.1](/java/docs/reference/google-oauth-client/1.34.1/com.google.api.client.extensions.auth.helpers.Credential)\n- [1.33.3](/java/docs/reference/google-oauth-client/1.33.3/com.google.api.client.extensions.auth.helpers.Credential)\n- [1.32.1](/java/docs/reference/google-oauth-client/1.32.1/com.google.api.client.extensions.auth.helpers.Credential) \n\n public interface Credential extends HttpRequestInitializer, HttpExecuteInterceptor, HttpUnsuccessfulResponseHandler\n\n**Deprecated.** *Use [com.google.api.client.auth.oauth2.Credential](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.Credential).*\n\nBeta \n\nImplementations of this class will have all of the information necessary to create and install\nthe necessary handlers on an HttpTransport object to allow for a streamlined auth\nexperience.\n\nImplementations of this interface should use the PersistenceCapable annotation to\nallow credentials to be managed on behalf of the application.\n\nWarning: starting with version 1.7, usage of this for OAuth 2.0 is deprecated. Instead use\n[com.google.api.client.auth.oauth2.Credential](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.Credential). \n\nImplements\n----------\n\ncom.google.api.client.http.HttpRequestInitializer, com.google.api.client.http.HttpExecuteInterceptor, com.google.api.client.http.HttpUnsuccessfulResponseHandler\n\nMethods\n-------\n\n### isInvalid() (deprecated)\n\n public abstract boolean isInvalid()\n\nDetermine if the Credential is no longer valid, after being revoked for example."]]