Create or update Placement in PHP

47 views
Skip to first unread message

Massimo Burgio

unread,
Sep 20, 2021, 7:03:00 AM9/20/21
to Google Ad Manager API Forum
Greetings, 

I would like to submit a problem to you. 

I work with the PHP API and need to create new Placements or modify old ones. 

However, I realized that in the examples of the standard libraries (https://developers.google.com/ad-manager/api/clients) relating to the various languages, there are, inside the folder: PlacementService, some example files. In java, for example, there are these files, CreatePlacements.java and UpdatePlacements.java. 

In the PHP language folder, these two files do not exist. 

Does this mean that the related commands, cretePlacements and updatePlacements, are not supported in PHP? 

I have also tried to translate the Java code to PHP but I always get an error like: 

faultMessage = [RequiredCollectionError.REQUIRED @ [0] .targetedAdUnitIds, RequiredError.REQUIRED @ [0] .name], Although I think I have correctly set the setTargetedAdUnitIds. 

Thanks for those who want to answer me
max

Ad Manager API Forum Advisor

unread,
Sep 20, 2021, 11:22:41 PM9/20/21
to antoninomas...@gmail.com, google-doubleclick...@googlegroups.com

Hi Massimo,

 

If a sample code doesn't exist for a client library, I suggest that you create an issue in the client library's github repository so the client library authors can address your concern. Here's a link to the PHP library's Issues page. The createPlacements or updatePlacements methods should be available in all client libraries even if there're no sample codes provided. You can use the sample codes from other service's create or update methods as reference on building your own code.

 

Regarding the error that you've encountered, can you please provide the complete SOAP request and response logs so I can have a closer look at it? You can send it to me via Reply privately to author option.

 

Regards,

Google Logo
Kevin Gil Soriano
Ad Manager API Team
 


ref:_00D1U1174p._5004Q2NVc0J:ref
Reply all
Reply to author
Forward
0 new messages