Get the Search Console connection status
GET
/v1/sites/{id}/gsc
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/gsc';const options = {method: 'GET', 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 GET \ --url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/gsc \ --header 'x-api-key: <x-api-key>'The site’s connection, projected for display - the sealed OAuth token
is never included in any response. configured is false when the
server has no Google OAuth client set up.
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 ”Connection status (all fields null when never connected).
Media typeapplication/json
A site’s Search Console connection, projected for display. The OAuth refresh token is sealed at rest and never appears in any response.
object
configured
required
Whether the server has a Google OAuth client configured.
boolean
status
required
string | null
googleEmail
required
string | null
property
required
string | null
analyticsSyncedAt
required
Epoch ms of the last analytics sweep, or null.
integer | null
error
required
string | null
Example
{ "status": "pending-property"}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"}