Skip to content
Account and onboarding

Set Google Ads connection mode

Records how the person will connect Google Ads during onboarding: central_read_only (Product Metrics' manager account sends an invite the person accepts in Google Ads; see google_ads.send_invite) or user_oauth (the person's own Google sign-in reaches the account).

PUT /onboarding/google-ads-connection-mode

Scope setup · Access Changes data · Operation id onboarding.set_google_ads_connection_mode

Try it

productmetrics runs after productmetrics login; curl needs PM_TOKEN (see Authentication).

productmetrics onboarding set-google-ads-connection-mode \
  --google-ads-connection-mode central_read_only \
  --json

Response

API response (200):

{
  "data": {
    "success": true
  },
  "request_id": "req_01J4JDRM27Z83H7A0PS5SXTP2Q"
}

CLI output: productmetrics onboarding set-google-ads-connection-mode --json prints { "ok": true, "data": …, "request_id": "…" } with the same data.

Before you call

This only stores the choice; connect an account with google_ads.create_property_connection afterwards.

Body

NameTypeRequiredDescription
google_ads_connection_modeenumYescentral_read_only: Product Metrics’ manager account sends an invite; user_oauth: the person’s own Google sign-in. One of central_read_only, user_oauth.

Errors

A failure answers with its HTTP status and { error: { code, message, details? }, request_id }. Branch on code (stable, lower_snake); show message to the person. The CLI prints the same error with "ok": false.

{
  "error": {
    "code": "insufficient_scope",
    "message": "This operation needs the setup scope; connect again and allow it.",
    "details": {
      "required_scope": "setup"
    }
  },
  "request_id": "req_01JGN7WW5T7PQGC6WK1S21RM60"
}
StatusCodeWhen
400invalid_requestA path, query or body value does not match this page. details.issues lists each location, path and message.
401invalid_tokenThe token is missing, expired or revoked: sign in again (productmetrics login). The WWW-Authenticate header says why.
403insufficient_scopeThe token lacks the setup scope (details.required_scope): sign in again and allow it.
429rate_limitedMore than 600 requests a minute for this person: wait the Retry-After seconds (60) and retry.

All Account and onboarding operations