Connecting to GAM through HTTP

26 views
Skip to first unread message

Maris Gabrans

unread,
Jun 12, 2024, 12:35:50 PMJun 12
to Google Ad Manager API Forum
Hey All!
Would anyone be able to help me in connecting to Google Ad Manager through HTTP? I can't find anywhere how exactly I would authenticate and call GAM without the Google libraries, but just from Postman (in my case a MuleSoft application). Which URLs to use for authentication, how to pass the credentials? There is a great amount of explanations, but nothing concrete unfortunately, so any help would highly appreciated!
Maris

Ad Manager API Forum Advisor

unread,
Jun 12, 2024, 4:13:18 PMJun 12
to m.ga...@gmail.com, google-doubleclick...@googlegroups.com
Hi,

Thank you for contacting the Ad Manager API support team.

To authenticate with the Ad Manager API, you can use either Service account or Web application OAuth2 authentication type. For adding a service account through the Ad Manager API, you can use the createUsers() method in the UserService to create a user with a required role based upon your requirements. You may get all roles in your network with the getAllRoles() method. Please follow the steps outlined in the API documentation to authenticate your Ad Manager API requests. Kindly note that the Ad Manager API doesn't use the API key for authentication. For more information on adding a service account user for the API access, I would recommend you to refer to this help center articles to Add a service account user for API access

As a next step, you can add the mentioned user account to "All Entities" teams. You can create teams and get information about all teams in your network using TeamService.

From the UserTeamAssociationService with createUserTeamAssociations() method, you can add the mentioned account to the required teams. You may refer to the help article to create and edit the Team permission. I would also suggest checking the help article regarding Creating and editing user roles. You can check the Java code sample of TeamService and all available client libraries of the Ad Manager API.

To create and get the Client ID and Client Secret, please go through this link in web application authentication. Here I am giving a link to authorize requests which describes the process of getting access token and you can also refer here to get a refresh token. For more information, we recommend you to go through this OAuth2.0 document and "create authentication credentials" section in the getStarted document in the Google API Console Credentials page.

Hope this helps!

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJItv:ref" (ADR-00239938)

Thanks,
 
Google Logo Ad Manager API Team


Reply all
Reply to author
Forward
0 new messages