Authorize Search Console API access with the correct OAuth scope and automate domain property verification via the Site Verification API
domain: developers.google.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Choose between the webmasters (read/write) and webmasters.readonly OAuth scopes depending on whether your integration needs to submit sitemaps/request indexing or just read data
For URL-prefix properties, pass siteUrl as the literal prefixed URL (e.g. https://www.example.com/); for Domain properties, use the sc-domain:example.com format
To programmatically add and verify a new Domain property rather than doing it manually via DNS in the UI, also request the Site Verification API's scope
Complete DNS TXT record verification through the Site Verification API before the corresponding Search Console API calls will succeed for that domain
Store and refresh OAuth tokens per the standard Google OAuth 2.0 flow, matching the scopes actually granted by the user
Known gotchas
Requesting only webmasters.readonly will fail on write operations like sitemap submission, and the error doesn't always make the missing scope obvious
Domain properties and URL-prefix properties are not interchangeable in the siteUrl parameter - passing the wrong format returns an error rather than a helpful validation message
Site verification via API requires DNS-level automation (TXT record) that many hosting setups don't expose programmatically, forcing a manual fallback
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?