Class Credentials (2.46.0-rc) Stay organized with collections Save and categorize content based on your preferences.
An opaque representation of the authentication configuration.
Applications use factory functions to provide the authentication parameters (for example, a raw access token). The factory function encapsulates the parameters in an instance of this class. The interface in this class is (intentionally) very narrow. Only the internal components in the client libraries should need to access the details of this class.
You can use theOAuth2 Library to create access tokens from aCredentials object.
See Also
https://cloud.google.com/docs/authentication for more information on authentication in GCP.
See Also
https://cloud.google.com/docs/authentication/client-libraries for more information on authentication for client libraries.
See Also
https://cloud.google.com/iam for more information on the IAM Service.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.