[ Web Proxy ]
URL:
Viewing: https://developers.google.com/android/reference/com/google/android/gms/common/api/HasApiKey [Back]  [Original]

HasApiKey  |  Google Play services  |  Google for Developers Skip to main content
Stay organized with collections Save and categorize content based on your preferences.

HasApiKey

public interface HasApiKey<O extends Api.ApiOptions>

Known direct subclasses
AuthorizationClient

A client for the authorization API.

CredentialSavingClient

A client for the Credential Saving API.

GoogleApi

Base class for Google API entry points.

ModuleInstallClient

Interface for module install APIs.

SignInClient

A client for the sign-in API.

Known indirect subclasses
GoogleSignInClient

This class is deprecated.

Use Credential Manager for authentication or Google Identity Services for authorization.


Anything that has an ApiKey.

This is used to allow GoogleApi-based clients to be exposed via interface instead of subclass. Those interfaces can be declared as extending this, and GoogleApi's will automatically fulfill the interface.

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 2026-08-19 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-19 UTC."],[],["`HasApiKey` is an interface in both Kotlin and Java. It serves as a marker for objects possessing an `ApiKey`. `GoogleApi`, the base class for Google API entry points, and `ModuleInstallClient`, an interface for module installation APIs, are direct subclasses. This interface enables `GoogleApi`-based clients to be exposed via interfaces instead of subclasses, allowing these interfaces to extend `HasApiKey`, which `GoogleApi` automatically fulfills.\n"]]

Web Proxy Viewer  |  New URL  |  Original Page