Get Google Search Console OAuth connect URL
Changed onStarts OAuth for Google Search Console. Each connected site becomes its own account with platform googlesearchconsole; it reads Google Search data and does not post.
Requested scope: https://www.googleapis.com/auth/webmasters.readonly.
Flow
Redirect the user to authUrl.
- One verified site: Zernio connects it and redirects to redirect_url (or the dashboard) with connected=googlesearchconsole, profileId, accountId and username (the site, such as acme.com).
- Several sites: the user first picks one on a Zernio-hosted page, which then redirects the same way.
Your own site picker
Add headless=true to redirect_url. Zernio then redirects there with step=select_site, profileId, platform=googlesearchconsole and a pendingDataToken for GET /v1/connect/googlesearchconsole/sites and POST /v1/connect/googlesearchconsole/select-site.
Errors
On failure the redirect carries error, platform=googlesearchconsole and error_message. Errors include:
- googlesearchconsole_scope_missing: the user unticked Search Console access.
- googlesearchconsole_no_sites: the Google account has no verified Search Console site.
- googlesearchconsole_no_refresh_token: Google returned no refresh token; connect again.
Request
- Base URLhttps://zernio.com/api
- Auth
- HTTP bearer
- or API key in header X-Connect-Token
Query parameters
Your Zernio profile ID (get from /v1/profiles).
Custom redirect after connection. Must be an absolute http(s) URL or custom app scheme such as myapp://callback; relative and unsafe URLs return 400.
Zernio account ID of the Google Search Console account being reconnected. Picking a different site then fails instead of adding a second account.
When true, authUrl opens on the Zernio-hosted welcome screen with your brand, as on GET /v1/connect/{platform}, naming Google Search Console.
- With no redirect_url, the flow ends on the branded result page instead of the Zernio dashboard.
- When left out, the screen shows if the workspace saved it as on by default (PUT /v1/connect/welcome-screen). Pass false to skip it.
- Cannot be combined with headless=true in redirect_url (400 INVALID_FIELD_VALUE).
Welcome screen only: your product name in its heading. Same rules as on GET /v1/connect/{platform}.
Welcome screen only: https URL of your square logo. Rejected with 400 INVALID_FIELD_VALUE when the welcome screen is not shown.
Welcome screen only: hex colour (#RRGGBB) of its button.
Welcome screen only: a URL-encoded JSON object restyling and rewording the welcome screen and the result page, with the keys documented on GET /v1/connect/{platform}. Rejected when the welcome screen is not shown.
Response
OAuth authorization URL and authenticated state
Changes
- info
added the new optional
queryrequest parameterbrandName - info
added the new optional
queryrequest parameterlogoUrl - info
added the new optional
queryrequest parameterprimaryColor - info
added the new optional
queryrequest parameterwelcome - info
added the new optional
queryrequest parameterwelcomeTheme
- info
- info
endpoint added
- info