We would like to connect and fetch data from the Google Ad Manager API. Since there is no dedicated Matillion component for this purpose we have created an API Profile and would like to realize the authorization by using OAuth2.0. So far we have tried to pass the OAuth parameters by specifying those in the Parameter section as you can see in the attached screenshot "api_profile.png" but it failed due to a failed authorization (also visible in the attached screenshot).
Do you have any idea why it's failing or concrete tutorial that explains how to connect to the Google Ad Manager API?
Thanks in advance.
Best regards, Gökhan
6 Community Answers
Goekhan Cimsir —
Unfortunately I could not find any option to attach files. If you need the metnioned attachments from my previous post please provide me an E-Mail address or any other option.
Thank you for your response and for highlighting the relevant documentation.
Although we've studied your referenced documentation we are still getting failures when connecting to our Google Ad Manager API.
Specifically we do not understand if we have to implement the OAuth2.0 flow manually when we want to create and connect to a custom API Profile.
One way we were thinking of is just to put the OAuth2.0 parameters such as OAuthClientId and OAuthCliendSecret in our custom API profile parameters but this did not work since it results in an authorization failed error response.
On the other hand we could try to create different rsd-files in our API-Profile that could deal with the single steps of an OAuth2.0 process such as
1. requesting the auth code 2. exchanging code for token etc.
The third option we can think of is to somehow link our API profile with the Matillion Manage OAuth configuration but here we would not know how to do so.
Is there any recommended way to authenticate/authorize a custom API Profile with OAuth2.0.
Matillion’s API Query component does not support OAuth in a single operation. Instead two steps are necessary:
You call the API’s authorization endpoint, provide the ClientId and the Secret, and receive back a bearer token.
You use the bearer token when calling any of the ordinary API endpoints.
Our document on Obtaining an API token and passing it into a RSD script has an example which you can download and install into your own environment in order to take a closer look at how those two steps could be implemented. It’s not specific to Google Ad Manager but does demonstrate how to split the problem into two parts.
Thank you for the referenced example. But even by following it we did not manage to authorize successfully with the Google Ad Manager API. In the example there seems to be a missing step at the beginning of the OAuth Flow that is required to correctly authorize with Google API.
In the first step it is needed to request an Authorization Code that is later exchanged for a Bearer Token by calling the /token endpoint as described here (Step 1: Set authorization parameters):