Provides an interface to hold and acquire the credentials that will be used to call the service.
Methods
getCredentials()
publicabstractCredentialsgetCredentials()
Gets the credentials which will be used to call the service. If the credentials have not been
acquired yet, then they will be acquired when this function is called.
[[["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-03-21 UTC."],[[["This webpage provides documentation for the `CredentialsProvider` interface within the Google API Client Libraries for Java."],["The latest version of `CredentialsProvider` documented is 2.63.1, and it provides links to documentation for versions all the way back to 2.7.1."],["The `CredentialsProvider` interface is responsible for holding and acquiring the credentials necessary to call Google services."],["The primary method in the `CredentialsProvider` interface is `getCredentials()`, which retrieves the credentials and acquires them if they have not already been obtained, and returns a `com.google.auth.Credentials` type."],["The `getCredentials()` method can throw an `IOException` which can occur while trying to obtain the credentials."]]],[]]