Issues related to API Dev

85 views
Skip to first unread message

Arslan Hassan

unread,
Sep 2, 2013, 1:47:58 AM9/2/13
to adsen...@googlegroups.com
Hi
I am having following issues

1 - Change callback url
Error
(start) unknown parameter: 'callbackUrl'
Code i am using 
$HostService->associationsessions->start(array('afc', 'afv', 'afmc'), 'tune.pk',array('callbackUrl'=>BASEURL.'/revenue_success.php'));

2 - When i gave access to arslan.tune @ gmail.com / i can see it in the 3rd-party access with the 0% of referral revenue?
3 - I am bit confused here, if Tune.pk(Sandbox account) is the host or the client? because I was testing and used my other account 'arslan.cb @ gmail.com' to give access and it gave me this error

Error calling GET : (403) Customer is not an AdSense Host.

Customer is not an AdSense Host.

Tune.pk is the client while who signs up is the host?

4 - If user account is blocked after signing up, how do we get notified?



Thanks
- AH

Jose Alcérreca (AdSense API Team)

unread,
Sep 2, 2013, 5:56:51 AM9/2/13
to adsen...@googlegroups.com
Hi there!

1. The PHP client library does not allow unknown parameters to be passed, I'm afraid. The workaround for this is
  a. You can change the callback URL on our side, although it's a manual process and can take a couple of weeks.
  b. Look for class Google_AssociationsessionsServiceResource and add 'callbackUrl' to the start function as a parameter.

2. and 3. What do you mean with "gave access"? Associated? You have to authenticate with your host account (arslan.tune) and only use the publisher account for the association flow. You will never have to use OAuth2 with your publisher account. I'd recommend you to create new accounts when associating with the sandbox host, not to use existing ones.

4. You can check that with the associationsession.verify method.

5. Sandbox accounts do not show ads.

Cheers,
Jose

---
Jose Alcérreca
Developer Relations

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

Arslan Hassan

unread,
Sep 2, 2013, 10:03:28 AM9/2/13
to adsen...@googlegroups.com
Hi Jose

1. The PHP client library does not allow unknown parameters to be passed, I'm afraid. The workaround for this is
b. Look for class Google_AssociationsessionsServiceResource and add 'callbackUrl' to the start function as a parameter.

Its working, thanks.

2. and 3. What do you mean with "gave access"? Associated? You have to authenticate with your host account (arslan.tune) and only use the publisher account for the association flow. You will never have to use OAuth2 with your publisher account. I'd recommend you to create new accounts when associating with the sandbox host, not to use existing ones.

Ok, correct me if i am wrong, i first get access from adsense host using arslan.tune 
$googleApiClient->getAccessToken();

once i have a token, i will associate publishers?
$adSenseHostService->associationsessions ->start

If thats correct, i WAS doing it wrong because now i have created a new account which is working.

and the last question, no.5

Even if I use my current AFV enabled adsense account as client, it does not display anything...? 
and what is the purpose of adtest parameter?

and can you please confirm if this is the correct adTag
http://googleads.g.doubleclick.net/pagead/ads?client=ca-video-4660751223571148&ad_type=video&description_url=http%3A%2F%2Ftune.pk%2Fpage%3Fkey%3Dvalue%26key2%3Dvalue2

where ca-video-4660751223571148 is my adsense enabled account.

Thanks 
- AH

Jose Alcérreca (AdSense API Team)

unread,
Sep 2, 2013, 10:16:50 AM9/2/13
to adsen...@googlegroups.com
Hi again,

2. and 3. your summary is perfect. That will work.

5. If the ad is generated with the Host API using a sandbox account, it won't show ads. I can't confirm about adTags as it's outside the scope of the API. Tags must be generated with the adunits.getAdCode method, not manually.

Cheers!
Jose

---
Jose Alcérreca
Developer Relations

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


Arslan Hassan

unread,
Sep 4, 2013, 4:09:30 AM9/4/13
to adsen...@googlegroups.com
Hi
I have an account associated an account with products AFV , AFC and AFMC 
but when i get ad-clients , it only returns


"items": [
{
"kind": "adsensehost#adClient",
"id": "ca-mb-pub-1607118212479286",
"productCode": "AFMC",
"supportsReporting": true
},
{
"kind": "adsensehost#adClient",
"id": "ca-pub-1607118212479286",
"productCode": "AFC",
"supportsReporting": true
}
]
}


What could be the reason?

Jose Alcérreca (AdSense API Team)

unread,
Sep 4, 2013, 6:29:05 AM9/4/13
to adsen...@googlegroups.com
Hi again,

AFV doesn't have the same structure as AFC or AFMC, as it doesn't use ad units, so it's not available in adclients.list.

Make sure that associationsessions.verify shows the correct product list after the association is done.

Cheers!
Jose

---
Jose Alcérreca
Developer Relations

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

Arslan Hassan

unread,
Sep 4, 2013, 8:18:36 AM9/4/13
to adsen...@googlegroups.com
So, whats the possible solution for generating Vast ad tag?

Jose Alcérreca (AdSense API Team)

unread,
Sep 4, 2013, 10:36:42 AM9/4/13
to adsen...@googlegroups.com
Hi!

In this page you'll find a "host" parameter below "optional parameters":


You can even add custom channels using the h_ch parameter.

If you need more details about it ask in the IMA SDKs forum as this is outside the scope of the AdSense APIs:


Hope that helps.

Cheers,
Jose

---
Jose Alcérreca
Developer Relations

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

Arslan Hassan

unread,
Sep 4, 2013, 1:44:22 PM9/4/13
to adsen...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages