# Google API Core Client - Class ApiKeyHeaderCredentials (1.43.0)

1.43.0 (latest) 1.42.5 1.40.0 1.38.2 1.36.1 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.