Configuration¶
Credential resolution uses this priority order (highest to lowest):
1. CLI Argument (Highest Priority)¶
Pass the service account file path directly on the command line:
2. Environment Variable -- File Path¶
Set GOOGLE_SERVICE_ACCOUNT_FILE to the path of your service account JSON key file:
3. Environment Variable -- JSON Content¶
Set GOOGLE_SERVICE_ACCOUNT_JSON to the raw JSON content of the service account key:
Useful in environments where secrets are stored as string values rather than files (e.g. containers, CI/CD secrets).
4. .env File (Lowest Priority -- Dev Convenience)¶
Create a .env file in the working directory:
Or with inline JSON:
Property URL Format¶
Search Console has two property types. The server accepts flexible input and normalizes automatically, but the underlying API requires a specific canonical form:
| Property type | Canonical form | Example |
|---|---|---|
| Domain property | sc-domain:example.com |
sc-domain:devleader.ca |
| URL-prefix property | https://www.example.com/ |
https://www.devleader.ca/ |
The server accepts bare domains, full URLs, or canonical forms as input to site_url parameters and normalizes them. On 403 errors, it automatically retries with property discovery to handle format mismatches.
Use list_sites to see the exact canonical URLs your service account has access to.