How to use Adsense API in iOS?

75 views
Skip to first unread message

idoodler

unread,
Jul 21, 2013, 8:09:40 AM7/21/13
to adsen...@googlegroups.com
Hi, I am new to that kind of API, I like to know how I can access the Adsense information with my app?

I already created the client with Google APIs Console. How can I authenticate the user and get the data of the user, is there some URL that displays a JSON file that can be parsed or what must I do, I can't figure it out with the official documentary.

Thanks for your time.

Jose Alcérreca (AdSense API Team)

unread,
Jul 23, 2013, 8:12:19 AM7/23/13
to adsen...@googlegroups.com
Hi there,

The official documentation is all you need to get started. 

is there some URL that displays a JSON file that can be parsed or what must I do,

That is, basically, it. If you use client libraries you won't have to guess the URL and the JSON files will be parsed for you, amongst other things like handling authentication.

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

idoodler

unread,
Jul 26, 2013, 5:18:05 PM7/26/13
to adsen...@googlegroups.com
Hm OK, I am trying this for 5 days now, and I can't get it to work, the OAuth2.0 part is working, I am getting a 
code, access_token, _token_type, expires_in, id_tokenr, refresh_token, id, email and verified_email. the scope is set to https://www.googleapis.com/auth/adsense.readonly

I think I have to do some kind of HTTP GET request, but I don't know the URL I can request the data, and I don't know how I should use GTMFetcher, I can't figure it out with the documentary (I know a part of the Request URL: https://www.googleapis.com/adsense/v1.3/reports?startDate=2013-06-01&endDate=2013-06-07&key=)

Btw, I used this to get the authentication stuff working: https://code.google.com/p/gtm-oauth2/wiki/Introduction

Jose Alcérreca (AdSense API Team)

unread,
Jul 29, 2013, 6:45:07 AM7/29/13
to adsen...@googlegroups.com
Hi idoodler,

Any reason not to use the client libraries?


We have no way to debug your implementation. If you need the URLs, check the discovery doc 

or the API reference:

You'll find the URL for every resource at the top of each resource page.

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


Reply all
Reply to author
Forward
0 new messages