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
Laravel Google Api

Laravel Google Api Laravel Package

tipoff/laravel-google-api

Laravel integration for Google APIs using OAuth client secrets and stored access tokens. Publishes config, reads .env settings, supports service-specific overrides, and includes GMB Account and Key models with built-in policies and Nova resources.

View on GitHub
Deep Wiki
Context7

Laravel Package for Google API & opinionated implementation with key model

Frequently asked questions about Laravel Google Api
Does this package support Laravel 10.x or only older versions?
The package was last updated in 2021 and lacks explicit Laravel 10.x support. While it may work with Laravel 7.x–9.x, test thoroughly for compatibility, especially with updated dependencies like `spatie`. Check the `composer.json` constraints for Laravel version requirements.
How do I configure multiple Google API services (e.g., YouTube + GMB) with different credentials?
Use service-specific overrides in `.env` (e.g., `YOUTUBE_CLIENT_ID`, `GMB_CLIENT_SECRET`) or publish the config and customize `config/google-api.php`. The package defaults to global credentials but allows per-service overrides without manual OAuth setup for each.
Can I use this package with Google API v3.x or only v2.x?
The package relies on `google/apiclient` v2.x, which may not fully support Google API v3.x features. If you need v3.x, consider alternatives like `spatie/google-api` or manually integrate the latest SDK. Test thoroughly if you must use v2.x.
How do I store and retrieve access tokens securely?
Tokens are stored in the `keys` table via the `Key` model, referenced by a configurable slug (set via `GOOGLE_ACCESS_TOKEN_SLUG`). Ensure the `value` field contains valid JSON-formatted tokens. Use Laravel’s encryption or database encryption for sensitive data.
Does this package work with Laravel Nova for managing Google API credentials?
Yes, the package includes Nova resources for the `GMB Account` and `Key` models. Publish the config, register Nova, and access these resources in Nova’s UI. Policies from `tipoff/authorization` are pre-registered, so no manual setup is needed.
What happens if my Google OAuth token expires? How do I refresh it?
The package doesn’t include built-in token refresh logic. You’ll need to manually refresh tokens via Google’s OAuth flow or use a library like `league/oauth2-client`. Store the refreshed token in the `keys` table and update the slug in `.env`.
Are there alternatives to this package with better maintenance?
Yes, consider `spatie/google-api` (more actively maintained) or `google/apiclient` directly for full control. If you need Laravel-specific features, evaluate `spatie`’s package for OAuth and token management, which may align better with modern Laravel practices.
How do I handle rate limits or exponential backoff for Google API calls?
The package doesn’t include built-in rate-limiting logic. Use Laravel’s HTTP client middleware (e.g., Guzzle’s `RetryMiddleware`) or Google’s client library methods to handle retries. Monitor API responses for rate-limit errors (`429`) and implement custom logic as needed.
Can I customize the OAuth redirect URIs or JavaScript origins dynamically?
Yes, use the `|` separator in `.env` for `GOOGLE_REDIRECT_URIS` and `GOOGLE_JAVASCRIPT_ORIGINS` to support multiple values. For dynamic values, override the config or use Laravel’s binding system to inject runtime values into the OAuth client.
Does this package support service accounts (non-OAuth) for Google APIs?
No, the package is designed for OAuth-based authentication only. For service accounts, use the `google/apiclient` library directly or extend this package’s `GoogleApiServiceProvider` to support service account credentials via `GOOGLE_SERVICE_ACCOUNT_JSON`.
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky