PeumeAPI

Social publishing & inbox · Google Analytics

Get Google Analytics OAuth connect URL

Starts OAuth for Google Analytics (GA4). Each connected GA4 property becomes its own account with platform `googleanalytics`; it reads reports and does not post.

$0.002 per callRuns on an account you connect

Call it

curl https://api.peume.com/v1/call/get-google-analytics-oauth-connect-url \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "redirect_url": "your redirect url",
    "reconnectAccountId": "your reconnectAccountId"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: get-google-analytics-oauth-connect-url.

Parameters

redirect_urlstring

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.

reconnectAccountIdstring

account ID of the Google Analytics account being reconnected. Picking a different property then fails instead of adding a second account.

welcomeboolean

When `true`, `authUrl` opens on the -hosted welcome screen with your brand, as on GET /v1/connect/{platform}, naming Google Analytics. - With no `redirect_url`, the flow ends on the branded result page instead of the 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`).

brandNamestring

Welcome screen only: your product name in its heading. Same rules as on GET /v1/connect/{platform}.

logoUrlstring

Welcome screen only: https URL of your square logo. Rejected with 400 `INVALID_FIELD_VALUE` when the welcome screen is not shown.

primaryColorstring

Welcome screen only: hex colour (`#RRGGBB`) of its button.

welcomeThemestring

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.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.