Skip to main content
GET
/
v1
/
connections
/
google
/
authorize
curl -X GET "https://api.adrelay.dev/v1/connections/google/authorize" \
  -H "X-API-Key: $ADRELAY_API_KEY"
{
  "data": {
    "url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...&redirect_uri=...&scope=..."
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.adrelay.dev/llms.txt

Use this file to discover all available pages before exploring further.

curl -X GET "https://api.adrelay.dev/v1/connections/google/authorize" \
  -H "X-API-Key: $ADRELAY_API_KEY"
{
  "data": {
    "url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...&redirect_uri=...&scope=..."
  }
}
The {platform} path parameter accepts: google, meta, or tiktok. Direct the user to the returned URL in their browser. After completing authorization, they will be redirected to your redirect_uri (or the AdRelay dashboard by default) with query params:
  • ?success=true&platform=GOOGLE&connectionId=... on success
  • ?error=... on failure

Custom Redirect URIs

By default, OAuth callbacks land on the AdRelay dashboard. To redirect to your own app:
  1. Register your URI via Settings or the Redirect URIs API
  2. Pass redirect_uri as a query parameter when calling authorize
Localhost URIs (ports 3000–3005, 5173, 8000, 8080) are pre-registered for development — no setup needed.
The redirect_uri only controls the final hop (AdRelay → your app). The platform-side OAuth callback (Google/Meta/TikTok → AdRelay) stays the same.

Authorizations

X-API-Key
string
header
required

Query Parameters

accountId
string

Response

Redirect to Google OAuth