# googleapis/google-api-php-client

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/googleapis-google-api-php-client).**

9,795 stars · 3,552 forks · PHP · Apache-2.0

## Links

- GitHub: https://github.com/googleapis/google-api-php-client
- Homepage: http://googleapis.github.io/google-api-php-client/
- awesome-repositories: https://awesome-repositories.com/repository/googleapis-google-api-php-client.md

## Description

The Google API PHP Client Library is a development kit for interacting with Google Cloud services and APIs. It provides standardized service interfaces to retrieve and manipulate data, serving as a comprehensive SDK for executing network requests across Google cloud platforms.

The library features a specialized authentication handler for OAuth 2.0, managing authorization flows, access tokens, and offline access via refresh tokens. It includes a service account authenticator that uses JSON key files or application default credentials for server-to-server communication, as well as mechanisms for domain and user account impersonation.

The project covers a broad range of capabilities, including identity token verification, cloud file management via multipart upload streams, and API response caching. It also provides tools for HTTP request signing, custom middleware configuration, and dependency management to reduce the deployment footprint.

The client supports diagnostic integration through event logging and HTTP traffic inspection via web proxies.

## Tags

### Web Development

- [API Integration Services](https://awesome-repositories.com/f/web-development/api-integration-services.md) — Provides a comprehensive programmatic interface for integrating Google Cloud services into PHP applications.
- [Cloud API Request Execution](https://awesome-repositories.com/f/web-development/api-request-configurations/cloud-api-request-execution.md) — Provides a standardized mechanism for executing authenticated network requests against Google Cloud API endpoints. ([source](https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-server.md))
- [Service Discovery](https://awesome-repositories.com/f/web-development/service-discovery.md) — Builds API client structures dynamically based on external service definitions to maintain compatibility with evolving endpoints.
- [Multipart Upload Utilities](https://awesome-repositories.com/f/web-development/multipart-upload-utilities.md) — Handles the transmission of large files using chunked or multipart HTTP requests for remote cloud storage.

### Artificial Intelligence & ML

- [Service-Class Abstractions](https://awesome-repositories.com/f/artificial-intelligence-ml/model-provider-abstractions/service-provider-abstractions/service-class-abstractions.md) — Maps individual API endpoints to dedicated PHP classes to provide a structured, object-oriented interface for cloud services.

### Development Tools & Productivity

- [API Client Libraries](https://awesome-repositories.com/f/development-tools-productivity/api-client-libraries.md) — Ships a standardized PHP client library for interacting with Google Cloud services and APIs.
- [Cloud Service SDKs](https://awesome-repositories.com/f/development-tools-productivity/cloud-service-sdks.md) — Provides a comprehensive set of tools for executing network requests, uploading files, and managing data across Google Cloud.
- [HTTP Request Signing Tools](https://awesome-repositories.com/f/development-tools-productivity/http-request-signing-tools.md) — Provides tools for signing HTTP requests and configuring custom middleware to communicate with remote API endpoints.

### Security & Cryptography

- [Cloud Service Authentication](https://awesome-repositories.com/f/security-cryptography/cloud-service-authentication.md) — Authenticates API requests using service account key files or environment-defined application default credentials. ([source](https://github.com/googleapis/google-api-php-client/blob/main/examples/service-account.php))
- [Service Account Authorization](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/authorization-and-user-administration/access-control-authorization/authorization-services/service-account-authorization.md) — Authenticates server-to-server communications using JSON key files or application default credentials without user intervention.
- [Service Account Authenticators](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/machine-and-protocol-identity/api-machine-authentication/api-key-authentication/service-account-authenticators.md) — Provides a service account authenticator using JSON key files or application default credentials for server-to-server communication.
- [Cloud Credential Providers](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/session-and-credential-handling/credential-security-utilities/cloud-credential-providers.md) — Automatically detects and injects cloud-native credentials from the environment for seamless authentication. ([source](https://github.com/googleapis/google-api-php-client/blob/main/UPGRADING.md))
- [Credential File Parsers](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/session-and-credential-handling/session-credential-management/credential-file-parsers.md) — Loads and parses service account identity JSON files from the local filesystem or environment variables for authentication.
- [Identity Verification Modules](https://awesome-repositories.com/f/security-cryptography/identity-verification-modules.md) — Validates identity tokens to confirm user identities and extract payload data for secure application access. ([source](https://github.com/googleapis/google-api-php-client/blob/main/UPGRADING.md))
- [OAuth 2.0 Authorization Flows](https://awesome-repositories.com/f/security-cryptography/oauth-2-0-authorization-flows.md) — Google Cloud PHP converts a temporary authorization code received from the server into an access token and refresh token. ([source](https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-web.md))
- [OAuth Authentication](https://awesome-repositories.com/f/security-cryptography/oauth-authentication.md) — Implements the standard OAuth 2.0 authorization flow to exchange codes for access tokens using defined scopes. ([source](https://github.com/googleapis/google-api-php-client#readme))
- [OAuth2 Implementations](https://awesome-repositories.com/f/security-cryptography/oauth2-implementations.md) — Manages the complete OAuth 2.0 lifecycle, including authorization code exchange and refresh token management for offline access.
- [Token Management](https://awesome-repositories.com/f/security-cryptography/token-management.md) — Manages the full lifecycle of OAuth 2.0 tokens, including expiration checks, refreshing, and revocation. ([source](https://github.com/googleapis/google-api-php-client/blob/main/UPGRADING.md))
- [User Access Management](https://awesome-repositories.com/f/security-cryptography/user-access-management.md) — Coordinates the interactive flow to obtain user consent and retrieve access tokens for accessing user-specific data. ([source](https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-web.md))
- [Offline Access Tokens](https://awesome-repositories.com/f/security-cryptography/access-token-management/offline-access-tokens.md) — Requests and manages refresh tokens to perform API actions on a user's behalf while the user is offline. ([source](https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-web.md))
- [Revocations](https://awesome-repositories.com/f/security-cryptography/access-token-management/revocations.md) — Programmatically removes permissions granted by a user to the application via token revocation API requests. ([source](https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-web.md))
- [Proof Key for Code Exchange](https://awesome-repositories.com/f/security-cryptography/authentication-flows/proof-key-for-code-exchange.md) — Implements Proof Key for Code Exchange (PKCE) to secure authorization code flows when client secrets are unavailable. ([source](https://github.com/googleapis/google-api-php-client/blob/main/CHANGELOG.md))
- [Domain-Wide Delegation](https://awesome-repositories.com/f/security-cryptography/identity-domain-management/domain-wide-delegation.md) — Performs actions on behalf of specific users within a domain using delegated domain-wide authority and service accounts. ([source](https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-server.md))
- [Identity Token Services](https://awesome-repositories.com/f/security-cryptography/identity-token-services.md) — Validates cryptographically signed ID tokens to confirm user identities and extract payload data.
- [Incremental Permissions](https://awesome-repositories.com/f/security-cryptography/oauth-authentication/google-oauth-providers/incremental-permissions.md) — Google Cloud PHP requests additional permissions as needed and merges them into existing access tokens to improve user experience. ([source](https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-web.md))
- [Outgoing Request Signing](https://awesome-repositories.com/f/security-cryptography/signature-verification-tools/outgoing-request-signing.md) — Applies cryptographic signatures to outgoing HTTP requests to ensure secure and authentic communication with remote servers. ([source](https://github.com/googleapis/google-api-php-client/blob/main/UPGRADING.md))
- [Authentication Token Caching](https://awesome-repositories.com/f/security-cryptography/token-authentication/authentication-token-caching.md) — Caches authentication tokens locally to reduce the frequency of credential verification requests to Google's servers. ([source](https://github.com/googleapis/google-api-php-client/blob/main/UPGRADING.md))
- [Account Impersonation](https://awesome-repositories.com/f/security-cryptography/user-access-management/session-impersonators/account-impersonation.md) — Sets a specific subject for a service account to perform actions on behalf of a target user. ([source](https://github.com/googleapis/google-api-php-client/blob/main/UPGRADING.md))

### Data & Databases

- [API Response Caching](https://awesome-repositories.com/f/data-databases/api-response-caching.md) — Stores and reuses API responses using a compatible caching library to reduce network requests and improve load times. ([source](https://github.com/googleapis/google-api-php-client#readme))
- [Cloud File Management](https://awesome-repositories.com/f/data-databases/cloud-file-management.md) — Provides interfaces for uploading and managing files and directory structures within cloud storage services.
- [Cloud File Uploaders](https://awesome-repositories.com/f/data-databases/cloud-file-uploaders.md) — Sends file data and metadata to remote cloud storage using media or multipart upload streams. ([source](https://github.com/googleapis/google-api-php-client/blob/main/examples/simple-file-upload.php))

### Networking & Communication

- [HTTP Client Configurations](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/http-client-libraries/http-client-configurations.md) — Allows customization of network request settings including headers, proxy routing, and middleware application. ([source](https://github.com/googleapis/google-api-php-client/blob/main/README.md))
- [Middleware-Based Request Pipelines](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/request-processing-architectures/request-processing/middleware-based-request-pipelines.md) — Implements a modular pipeline of components to intercept and modify outgoing network requests and responses.
- [HTTP Request Customization](https://awesome-repositories.com/f/networking-communication/http-request-customization.md) — Enables the creation of secure connections and custom headers for requests to endpoints outside the standard service set. ([source](https://github.com/googleapis/google-api-php-client/blob/main/README.md))
