Re: add hostCustomChannelId fail!

37 views
Skip to first unread message

Sérgio Gomes (AdSense API Team)

unread,
Jan 2, 2013, 9:39:00 AM1/2/13
to adsen...@googlegroups.com
Hi there,

adClientId is one of the required parameters, and is usually in the form "ca-pub-xxxxx" for AFC, so make sure you're including that in your request. You can retrieve all ad clients with the respective "list" method.

As for specifying multiple custom channels, this is already possible; the API call can take this parameter multiple times. In the case of PHP, giving the method an array of custom channel IDs should do the trick.

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902

On Wednesday, 2 January 2013 06:17:31 UTC, sorry chou wrote:
hello:

i want to add customchannel to adunit, and the document says using optional parameter "hostcustomchannelid" when call "getAdCode" as follows
$adSenseHost->accounts_adunits->getAdCode($accountid, $clientid, $adunitid, $hostCustomChannelId);

but always get error message "(getAdCode) missing required param: 'adClientId'"

remove hostCustomChannelId can get success message, why? 

and how to add more than one channel?

thanks!

Sérgio Gomes (AdSense API Team)

unread,
Jan 3, 2013, 6:45:25 AM1/3/13
to adsen...@googlegroups.com
Hmm, sounds like the PHP client isn't handling arrays correctly. Perhaps file a bug on the client's issue tracker? The author should be able to help you figure out the issue.

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902

On Thursday, 3 January 2013 07:54:30 UTC, sorry chou wrote:
HI:

you right !!, customchannelid type is array, thanks!!

but new problem is when array data more than one, result error '(getAdCode) unknown parameter: '1'

using php client api

thank you!
Reply all
Reply to author
Forward
0 new messages