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"
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/destinations/oauth/initiate"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"destination_type": "google_ads",
"credential_name": "John Doe",
"login_customer_id": "example_string",
"login_hint": "example_string",
"return_url": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/destinations/oauth/initiate", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"destination_type": "google_ads",
"credential_name": "John Doe",
"login_customer_id": "example_string",
"login_hint": "example_string",
"return_url": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"destination_type": "google_ads",
"credential_name": "John Doe",
"login_customer_id": "example_string",
"login_hint": "example_string",
"return_url": "example_string"
}`)
req, err := http.NewRequest("POST", "https://mythic-analytics.gulp.workers.dev/client/v1/destinations/oauth/initiate", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/destinations/oauth/initiate')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"destination_type": "google_ads",
"credential_name": "John Doe",
"login_customer_id": "example_string",
"login_hint": "example_string",
"return_url": "example_string"
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"consent_url": "example_string",
"expires_in": 900,
"oauth_client_source": "agency"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Service Unavailable",
"message": "The service is temporarily unavailable. Please try again later",
"code": 503
}
/client/v1/destinations/oauth/initiate
Target server for requests. Edit to use your own host.
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.
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.
The media type of the request body
Google Ads manager account, when the operating account sits under one.
Preselects a Google account. Convenience only — it cannot restrict who consents.
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
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
google_adsgoogle_analyticsGoogle Ads manager account, when the operating account sits under one.
Preselects a Google account. Convenience only — it cannot restrict who consents.
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.