Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Apiclient Services

Apiclient Services Laravel Package

google/apiclient-services

Auto-generated Google API service definitions for the Google API PHP Client. Updated daily to reflect new/changed APIs and tagged weekly. Install via Composer (typically as a dependency of google/apiclient) to access specific Google service classes.

View on GitHub
Deep Wiki
Context7

Client library for Google APIs

Frequently asked questions about Apiclient Services
How do I install google/apiclient-services in a Laravel project?
Run `composer require google/apiclient`—this installs the main Google API PHP Client, which includes auto-generated service definitions. No additional steps are needed for Laravel compatibility, as the package adheres to PSR-4 autoloading standards.
Which Laravel versions does this package support?
The package requires PHP 8.0+ and works with Laravel 8.x, 9.x, and 10.x. It has no Laravel-specific dependencies, so it integrates seamlessly with any modern Laravel installation.
Can I use this for Gmail API automation in Laravel?
Yes. Inject `Google_Service_Gmail` into a Laravel service or controller, then use methods like `users.messages.list()` to fetch emails. Pair with Laravel’s Sanctum or Passport for OAuth 2.0 token management.
How do I handle token refreshes for Google APIs in Laravel?
Create a custom `GoogleAuthService` class to manage OAuth tokens. Use Laravel’s caching (e.g., `cache()->remember()`) to store refresh tokens and implement a `refreshToken()` method to handle Google’s token refresh flow.
Does this support batch requests for large-scale operations?
Yes. Use the `batch()` method on Google service clients (e.g., `Google_Service_Drive`) and wrap the operation in a Laravel queued job. Implement pagination with `pageToken` for APIs like Drive’s `files.list()`.
How do I mock Google API responses for testing in Laravel?
Use tools like `mockery` or `vcr` to mock `Google_Service_*` classes. Laravel’s HTTP testing helpers can simulate OAuth flows by intercepting requests to `https://accounts.google.com/o/oauth2/v2/auth`.
Can I integrate Google Drive with Laravel’s Filesystem?
Yes. Create a custom `GoogleDriveAdapter` extending Laravel’s `FilesystemAdapter` interface. Use `Google_Service_Drive` to map Drive files to Laravel’s filesystem methods like `read()`, `write()`, and `delete()`.
What’s the fallback if a Google API isn’t supported in this package?
Check Google’s [Cloud PHP packages](https://cloud.google.com/php/docs/reference) for alternatives. If no official client exists, use the base `google/apiclient` package to manually construct API requests via REST.
How do I handle Google API errors in Laravel’s exception handler?
Catch `Google_Service_Exception` and map it to Laravel’s `HttpException` or `Reportable` interfaces. Use Laravel’s error handling middleware to log errors and return user-friendly responses.
Is this package suitable for production workloads with high API call volumes?
Yes, but implement rate-limiting (e.g., `throttle` middleware) and exponential backoff for retries. Use Laravel queues to distribute batch operations and avoid timeouts.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope