AdSense Host API v4.1 has launched!

198 views
Skip to first unread message

Sérgio Gomes

unread,
Sep 19, 2012, 12:38:15 PM9/19/12
to adsen...@googlegroups.com
There's a new version of the AdSense Host API, v4.1, designed to replace v3 for ContentAds hosts. New features from v4 include:


--Sérgio, on behalf of the AdSense API Team


---
Sérgio Gomes
Developer Relations

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

Ashesh Bharadwaj

unread,
Sep 25, 2012, 7:23:50 AM9/25/12
to adsen...@googlegroups.com
Thanks a lot for the lightening fast reply. I will look over there. Another issue where I am stuck is, "AdSense Host API access request" it asks for "Unique passcode (shared with you via email) *"
 
 
The thing is, I am a developer and the account was created by my boss who does not have much technical knowledge. Can you let me know where shall he look for this passcode? Any particular string or text to search for in email subject/content?


 
On Tue, Sep 25, 2012 at 4:45 PM, Sérgio Gomes (AdSense API Team) <adsenseapiad...@google.com> wrote:
Hi there,

Yes, things now happen through the APIs console and OAuth 2.0.

Examples are still being reviewed by the client library authors, but you can take a look at the ongoing code review at https://codereview.appspot.com/6535054/ . Do bear in mind that this code is meant to go against the trunk version of the client library, not 0.5.0.

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 Tuesday, September 25, 2012 12:02:49 PM UTC+1, Ashbey wrote:
Thanks Sérgio,
 
In AdSense API v3 it was AdSense account login which was used for authentication but seems now authentication is done using APIs console right?
 
I downloaded google-api-php-client-0.5.0 but it has minimal examples dealing with AdSense implemenation (Account Creation / Association, Creating Ad Units etc.). Is there a guide / example specific to this verison of AdSense?

--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/adsense-api/-/VzukpQLW5BIJ.

To post to this group, send email to adsen...@googlegroups.com.
To unsubscribe from this group, send email to adsense-api...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.



--
Regards,
 
Ashesh Bharadwaj

Sérgio Gomes (AdSense API Team)

unread,
Sep 25, 2012, 8:10:11 AM9/25/12
to adsen...@googlegroups.com, ash...@paradisepublishers.com
Hi there,

I'm afraid that's a bit outside of my hands, as this is handled by the sales team when performing a business review of your proposal. Please send an email to adsenseap...@google.com asking for the status of your review; the sales team there should be able to help further.

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


---

Ashesh Bharadwaj

unread,
Sep 25, 2012, 9:56:52 AM9/25/12
to adsen...@googlegroups.com
Thanks again. I will look into it.
 
Few more questions:
 
 
Here it mentions
require_once 'google-api-php-client/src/contrib/apiAdsensehostService.php';
but in google-api-php-client-0.5.0 there is no such file.
 
The example on this guide is different than the one in google-api-php-client-0.5.0/examples/adsense/index.php
 
 
 
 
I could not find any function "associationsessions.start" in client library google-api-php-client-0.5.0
 
 
#3 What I am confiused is, in "Host API Signup Flow" https://developers.google.com/adsense/host/signup
 
It says
 
Once you've stored the account ID, you have all the information you need to manage the user. You can now use it to make API calls specific to them, such as checking their AdSense account status with accounts.get or managing their ad units with the accounts.adunits collection

Where does OAuth comes in picture in this process?



To view this discussion on the web visit https://groups.google.com/d/msg/adsense-api/-/D99FCLONFEcJ.

To post to this group, send email to adsen...@googlegroups.com.
To unsubscribe from this group, send email to adsense-api...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.



--
Regards,
 
Ashesh Bharadwaj

Sérgio Gomes (AdSense API Team)

unread,
Sep 26, 2012, 9:00:00 AM9/26/12
to adsen...@googlegroups.com, ash...@paradisepublishers.com
Hi Ashesh,

Let me answer your questions inline:


On Tuesday, September 25, 2012 2:56:52 PM UTC+1, Ashesh Bharadwaj wrote:
Thanks again. I will look into it.
 
Few more questions:
 
 
Here it mentions
require_once 'google-api-php-client/src/contrib/apiAdsensehostService.php';
but in google-api-php-client-0.5.0 there is no such file.
 
The example on this guide is different than the one in google-api-php-client-0.5.0/examples/adsense/index.php
 
 

This documentation is outdated, I'm afraid, and will be removed soon. To use the AdSense Host API in PHP, make sure you use the trunk version of the client library, not 0.5.0.


 
 
 
I could not find any function "associationsessions.start" in client library google-api-php-client-0.5.0

Again, please use the trunk version of the client library, not 0.5.0.

 
 
 
#3 What I am confiused is, in "Host API Signup Flow" https://developers.google.com/adsense/host/signup
 
It says
 
Once you've stored the account ID, you have all the information you need to manage the user. You can now use it to make API calls specific to them, such as checking their AdSense account status with accounts.get or managing their ad units with the accounts.adunits collection

Where does OAuth comes in picture in this process?

As with any API that accesses protected user data, you must give the application access to your data. In this case, I would recommend:

1- You create your API project, with access type "installed application"
2 - You authenticate against the API using your application or a small script, with your host account, and saved the returned refresh token
3 - You use the stored refresh token to make requests with your application in the future

Ashesh Bharadwaj

unread,
Sep 26, 2012, 11:43:01 AM9/26/12
to adsen...@googlegroups.com
Thanks a lot Sérgio for being just a helpful person.
 
I have got enough material to work on. Might bother you again if I get stuck :)

To view this discussion on the web visit https://groups.google.com/d/msg/adsense-api/-/06PDLXgxXmgJ.

To post to this group, send email to adsen...@googlegroups.com.
To unsubscribe from this group, send email to adsense-api...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.



--
Regards,
 
Ashesh Bharadwaj

Sérgio Gomes (AdSense API Team)

unread,
Dec 6, 2012, 9:05:31 AM12/6/12
to adsen...@googlegroups.com, ash...@paradisepublishers.com
Hi there,

Thank you, good to hear the video was helpful! :)

Your entry only seems to have come in today, I'm afraid. We'll be setting you up with your new sandbox account early next week, hope that works for you.

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, 6 December 2012 11:32:03 UTC, Ashbey wrote:
Thanks for the helpful video https://www.youtube.com/watch?v=x71eomcpcdw . I suspect you did not get any viewer questions because everything was so well explained.
 
I am stuck at API console still showing "Request access" link against "AdSense Host API". I have already filled and submitted the form few times and did it again just now.
 
Can you please help me with this?

Ashesh Bharadwaj

unread,
Dec 6, 2012, 9:15:01 AM12/6/12
to adsen...@googlegroups.com
Thanks Sérgio for the prompt reply. Not an issue.
 
I am still struggling to get a working example for AdSense publisher signup. Instead of going through the REST implementation directly I was inclidned using the Google client library but it seems the library http://code.google.com/p/google-api-php-client/downloads/detail?name=google-api-php-client-0.6.0.tar.gz&can=2&q= is still not functional.
 
Is it possible to have a working example for the following page:
 


To view this discussion on the web visit https://groups.google.com/d/msg/adsense-api/-/Xwoh9N4vtG8J.

To post to this group, send email to adsen...@googlegroups.com.
To unsubscribe from this group, send email to adsense-api...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.



--
Regards,
 
Ashesh Bharadwaj

Sérgio Gomes (AdSense API Team)

unread,
Dec 6, 2012, 12:35:16 PM12/6/12
to adsen...@googlegroups.com, ash...@paradisepublishers.com
Hi there,

The PHP client library hasn't done a release since adding support for the AdSense Host API, but it is there; you'll just need to check out the current version of the repository instead of downloading a package. Here are some details on how to do it: http://code.google.com/p/google-api-php-client/source/checkout

Hope this helps!

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

Reply all
Reply to author
Forward
0 new messages