You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/google_ads/README.md
+79-4Lines changed: 79 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,16 @@ such as creating and managing campaigns, adding and removing keywords, and
19
19
adjusting bids. You can also use the API to get information about your
20
20
campaigns, such as campaign stats, keyword stats, and ad performance.
21
21
22
-
## Customizing API requests with the Pipedream proxy
22
+
## Customizing API requests from within the Pipedream workflow builder
23
23
24
-
The Pipedream components interact with Google Ads API through Pipedream's proxy service, which handles authentication and developer token requirements.
24
+
The Pipedream components interact with Google Ads API through an interal proxy service, which protects Pipedream's developer token.
25
25
26
26
The component accepts a standard Google Ads API request object with the following structure:
The proxy endpoint will remain the same: `https://googleads.m.pipedream.net`
61
+
**The proxy endpoint will remain the same: `https://googleads.m.pipedream.net`**
62
+
63
+
## Using Google Ads with the Connect API Proxy
64
+
65
+
To interface with Google Ads via the [Connect API Proxy](https://pipedream.com/docs/connect/api-proxy), you essentially need to nest the request like this:
66
+
67
+
**Important notes:**
68
+
69
+
- The upstream URL in this case is Pipedream's proxy service for Google Ads
70
+
- Like in the [above examples](#customizing-api-requests-from-within-the-pipedream-workflow-builder), you'll define the Google Ads URL with the `url` param in the `body`
71
+
- The `method` to the Connect Proxy should always be a `POST`, since it's actually targeting the Google Ads proxy (define the method for the Google Ads request in `options.body.method`)
// data: {} // If you need to send a body with a POST request, define it here
103
+
},
104
+
},
105
+
}
106
+
);
107
+
```
108
+
109
+
### Using the Connect REST API
110
+
111
+
```bash
112
+
# First, obtain an OAuth access token to authenticate to the Pipedream API
113
+
114
+
curl -X POST https://api.pipedream.com/v1/oauth/token \
115
+
-H "Content-Type: application/json" \
116
+
-d '{
117
+
"grant_type": "client_credentials",
118
+
"client_id": "{your_oauth_client_id}",
119
+
"client_secret": "{your_oauth_client_secret}"
120
+
}'
121
+
122
+
# The response will include an access_token. Use it in the Authorization header below.
123
+
124
+
# Base64 encode the Pipedream endpoint for Google Ads: https://googleads.m.pipedream.net
125
+
126
+
curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/proxy/{url_safe_base64_encoded_url}?external_user_id={external_user_id}&account_id={apn_xxxxxxx}" \
0 commit comments