Call it
curl https://api.peume.com/v1/call/google-get-oauth-connect-url \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"redirect_url": "your redirect url",
"reconnectAccountId": "your reconnectAccountId"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-get-oauth-connect-url", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"redirect_url": "your redirect url",
"reconnectAccountId": "your reconnectAccountId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-get-oauth-connect-url",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"redirect_url": "your redirect url",
"reconnectAccountId": "your reconnectAccountId"
}
},
)
print(res.json()["output"])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: google-get-oauth-connect-url.
Parameters
redirect_urlstringCustom redirect after connection. Must be an absolute http(s) URL or custom app scheme such as `myapp://callback`; relative and unsafe URLs return 400.
reconnectAccountIdstringaccount ID of the account being reconnected. Picking a different site then fails instead of adding a second account.
welcomebooleanWhen `true`, `authUrl` opens on the -hosted welcome screen with your brand, as on GET /v1/connect/{platform}, naming. - 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`).
brandNamestringWelcome screen only: your product name in its heading. Same rules as on GET /v1/connect/{platform}.
logoUrlstringWelcome screen only: https URL of your square logo. Rejected with 400 `INVALID_FIELD_VALUE` when the welcome screen is not shown.
primaryColorstringWelcome screen only: hex colour (`#RRGGBB`) of its button.
welcomeThemestringWelcome 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.
