[[["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 CredentialStore (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.auth.oauth2.CredentialStore)\n- [1.38.2](/java/docs/reference/google-oauth-client/1.38.2/com.google.api.client.auth.oauth2.CredentialStore)\n- [1.37.0](/java/docs/reference/google-oauth-client/1.37.0/com.google.api.client.auth.oauth2.CredentialStore)\n- [1.36.0](/java/docs/reference/google-oauth-client/1.36.0/com.google.api.client.auth.oauth2.CredentialStore)\n- [1.34.1](/java/docs/reference/google-oauth-client/1.34.1/com.google.api.client.auth.oauth2.CredentialStore)\n- [1.33.3](/java/docs/reference/google-oauth-client/1.33.3/com.google.api.client.auth.oauth2.CredentialStore)\n- [1.32.1](/java/docs/reference/google-oauth-client/1.32.1/com.google.api.client.auth.oauth2.CredentialStore) \n\n public interface CredentialStore\n\n**Deprecated.** *(to be removed in the future) Use DataStoreFactory with [StoredCredential](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.StoredCredential) instead.*\n\nBeta \n\nOAuth 2.0 credential persistence store interface to provide a fully pluggable storage mechanism.\n\nThe user ID should be used as the primary key for storage, and the rest of the data consists\nof the [access token](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.Credential#com_google_api_client_auth_oauth2_Credential_getAccessToken_), refresh token, and [expiration time](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.Credential#com_google_api_client_auth_oauth2_Credential_getExpirationTimeMilliseconds_).\n\nImplementations should be thread safe.\n\nMethods\n-------\n\n### delete(String userId, Credential credential) (deprecated)\n\n public abstract void delete(String userId, Credential credential)\n\nDeletes the credential of the given user ID.\n\n### load(String userId, Credential credential) (deprecated)\n\n public abstract boolean load(String userId, Credential credential)\n\nLoads the credential for the given user ID.\n\n### store(String userId, Credential credential) (deprecated)\n\n public abstract void store(String userId, Credential credential)\n\nStores the credential of the given user ID."]]