get
https://production-api.shoutaboutus.com/api/v1/google/access-token
Exchanges a Google OAuth code for an access token, stores it (google_access_tokens), and then branches: with connect_google=1 + company_id_hash it links the token to that company and syncs its GBP locations (dispatching DuplicateGMBDebugger). With source=app it returns the token plus fetched account/location data; otherwise it returns only the stored token id + token. Requires the business.manage scope to have been granted at consent. Records gbp_connection_events.
Auth
- Auth-optional. Bearer token (api guard) OR the public connect-page pair (
connect_google=1+company_id_hash) OR an invitehash. No token needed for the latter two.
Rate limit
- 30 requests/min per IP (public).
Query
| Field | Type | Required | Notes |
|---|---|---|---|
code | string | Required | Google OAuth authorization code. |
connect_google | integer (0,1) | Optional | 1 → link token to company + sync GBP locations. |
company_id_hash | string | Optional | Required when connect_google=1. Hashid of the target company. |
source | string (app,web) | Optional | app returns account+location data; picks the redirect URI. |
hash | string | Optional | Invite hash encoding [store_id, 15]; grants access without a token. |
Behaviour
- 200 with the token payload (web/app) or the synced location list (
connect_google=1). 400 for an invalid company hash. Note: missingbusiness.managescope, absent access token, and Google token-endpoint errors are surfaced viaerrorResponse(HTTP 500) with an explanatory message.
Errors: 422 on validation failure.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
