Google API Core Client - Class ApiKeyHeaderCredentials (1.35.1)

Reference documentation and code samples for the Google API Core Client class ApiKeyHeaderCredentials.

The ApiKeyHeaderCredentials object provides a wrapper around an API key.

Namespace

Google \ ApiCore

Methods

__construct

ApiKeyHeaderCredentials constructor.

Parameters
Name Description
apiKey string

The API key to set in the header for the request

quotaProject string|null

The quota project associated with the API key.

getQuotaProject

Returns
Type Description
string|null The quota project associated with the credentials.

getAuthorizationHeaderCallback

Parameter
Name Description
unusedAudience string|null

audiences are not supported for API keys.

Returns
Type Description
callable|null Callable function that returns the API key header.

checkUniverseDomain

Verify that the expected universe domain matches the universe domain from the credentials.