DestinationsStart the Google consent flow

Start the Google consent flow

Returns a consent_url so nobody has to create a Cloud project or paste a refresh token. Valid for 15 minutes and single-use. The credential the callback stores is identical in shape to a hand-pasted one.

curl -X POST "https://mythic-analytics.gulp.workers.dev/client/v1/destinations/oauth/initiate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "destination_type": "google_ads",
  "credential_name": "John Doe",
  "login_customer_id": "example_string",
  "login_hint": "example_string",
  "return_url": "example_string"
}'
{
  "success": true,
  "data": {
    "consent_url": "example_string",
    "expires_in": 900,
    "oauth_client_source": "agency"
  }
}
POST
/client/v1/destinations/oauth/initiate
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need destinations:read or destinations:write. See Using an mcp_ key over HTTP.

Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need destinations:read or destinations:write. See Using an mcp_ key over HTTP.
Content-Typestring
Required

The media type of the request body

Options: application/json
destination_typestring
Required
Options: google_ads, google_analytics
login_customer_idstring

Google Ads manager account, when the operating account sits under one.

login_hintstring

Preselects a Google account. Convenience only — it cannot restrict who consents.

return_urlstring

Where to send the browser afterwards, with mythic_oauth=success or mythic_oauth=error&mythic_error=<code> appended. The ORIGIN must be registered on the agency first — the callback is unauthenticated, so an arbitrary target would make it an open redirector. Omit for a terminal page instead.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need destinations:read or destinations:write. See Using an mcp_ key over HTTP.

Body

application/json
destination_typestring
Required
Allowed values:google_adsgoogle_analytics
login_customer_idstring

Google Ads manager account, when the operating account sits under one.

login_hintstring

Preselects a Google account. Convenience only — it cannot restrict who consents.

return_urlstring

Where to send the browser afterwards, with mythic_oauth=success or mythic_oauth=error&mythic_error=<code> appended. The ORIGIN must be registered on the agency first — the callback is unauthenticated, so an arbitrary target would make it an open redirector. Omit for a terminal page instead.

Responses

successboolean
dataobject