Start the Google OAuth flow
POST
/v1/sites/{id}/gsc/connect
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/gsc/connect';const options = {method: 'POST', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/gsc/connect \ --header 'x-api-key: <x-api-key>'Returns the Google consent-screen URL carrying a short-lived signed state bound to this org + site. The browser completes consent at Google, which redirects to the public callback; the callback stores the sealed refresh token and bounces back to the dashboard. Owner/admin only.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”id
required
string format: uuid
The site’s UUID.
Responses
Section titled “ Responses ”The consent URL to navigate the browser to.
Media typeapplication/json
object
url
required
string format: uri
Examplegenerated
{ "url": "https://example.com"}Missing or invalid credentials.
Media typeapplication/json
object
error
required
A human-readable error message.
string
Example
{ "error": "invalid api key"}Site not found, or the SEO app is not enabled.
Media typeapplication/json
object
error
required
A human-readable error message.
string
Examplegenerated
{ "error": "example"}The server has no Google OAuth client configured.
Media typeapplication/json
object
error
required
A human-readable error message.
string
Examplegenerated
{ "error": "example"}