google-search-console
Installation
SKILL.md
Query Google Search Console via curl + jq. The user's OAuth bearer token is
in $GOOGLE_SEARCH_CONSOLE_TOKEN (scope webmasters.readonly); every call needs
Authorization: Bearer $GOOGLE_SEARCH_CONSOLE_TOKEN. Base:
https://searchconsole.googleapis.com.
Failures are {"error":{"code","message","status"}} — show verbatim. 401 =
re-install. 403 = the token's account doesn't own/verify that site.
AUTH="Authorization: Bearer $GOOGLE_SEARCH_CONSOLE_TOKEN"
# Verified sites (siteUrl is the property — URL-encode it in later calls)
curl -sS -H "$AUTH" "https://searchconsole.googleapis.com/webmasters/v3/sites" \
| jq '.siteEntry[] | {siteUrl, permissionLevel}'