I've been figuring out how to connect EasyMorph with Google Ads.
So far, I have created a Service Account and a OAuth Access on Google Cloud and I'm ready to access the API. But I can't make EasyMorph to connect. I'm sure I'm missing something.
With a Service Account:
I have created a new connector that looks like this.
The Service account has access. I also tried with OAuth... same story.
Can't have detailed http answer for debugging...
What I'm missing? anyone had done the same?
Firstly, it seems that you may have forgotten to press the large "Authorize" button in the connector window after setting it up. With OAuth, it is necessary to complete an interactive authorization in order for EasyMorph to obtain the access token before utilizing the connector.
Secondly, it appears that you have entered the wrong Base URL. The Base URL should be the URL for the API to which you will be making requests, rather than the URL for OAuth services like on your screenshot.
For Google Ads, the Base URL should be something like https://googleads.googleapis.com/v14.
Thirdly, please make sure to enter both your client ID and client secret, as both are required. Additionally, I am unsure about all the parameters you have entered - are you certain that they are all required (such as private key, etc)? According to the Google Ads API documentation, I couldn't find any reference to them.
Furthermore, please note that in order to access Google Ads, you may additionally need to apply for a developer token. You can find more information on how to obtain a developer token at the following link: Obtain a developer token | Google Ads API | Google for Developers
Lastly, there is a sample Google WebAPI project available that includes a pre-setup connector for the Google API. You can repurpose this connector by simply changing the Base URL to Google Ads API and entering your credentials (client ID and secret).
Thanks for your answer!
Well, I didn't forget to apply the Client secret because those screenshots are for a Service Account (there is no client secret).
Still, with your message I tried using a regular OAuth 2.0 with my account, added the scope (that's what I was missing) and it seems to be connected!
I understand that this happens because the parameter Authorization is missing. It should look like this:
Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7pk8pk8F53j4Q
(it's an example, that token is not real...)
Anyway, the connector is authorized.
I think I should add this parameter manually to make it work. But I can't see the token in EasyMorph. Also, I'm not sure why Easymorph is not sending the parameter considering that it has been authorized...
I didn't realize that. So you must be using Service Account Flow.
Currently, our out-of-the-box support for OAuth only includes the standard OAuth Authorization Code Flow, which is commonly used for Web and Desktop applications to authorize the application on behalf of the user.
Unfortunately, we do not currently support this specific Service Account Flow out of the box. After reviewing Google's documentation, it is not clear how this flow operates at a low level, making it difficult to simulate it with EasyMorph actions. The documentation primarily focuses on the use of Google-provided libraries, rather than providing specifics on the flow at a per-request level.
/v14/customers/[ACCOUNT ID HIDDEN]/googleAds:searchStream
using this query:
{
"query" : "SELECT campaign.name, campaign.status, segments.device,
metrics.impressions, metrics.clicks, metrics.ctr,
metrics.average_cpc, metrics.cost_micros
FROM campaign
WHERE segments.date DURING LAST_30_DAYS"
}
I have attempted to recreate your environment using our test Google Ads account. This account is empty and intended for testing purposes only, but it should closely resemble your own account.
I have tested the configuration and it appears to be working correctly. Here are the details:
Also, attached is the project file, with all tokens and keys replaced by template strings. In the current example, the template connector is embedded within the project itself.
However, you should use a shared connector stored in either the server or desktop repository.
Thank you! very useful information and file.
I still has this 401 error. If your file works for you, this is not in the EasyMorph side. That's very clear.
My best guess is... this is something on my auth screen, or something in GCP is missing. I'll keep trying and I will post here the solution