Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What you're after is the <a href="http://code.google.com/apis/contacts/docs/3.0/developers_guide.html" rel="nofollow">Google Contacts API</a>. If you're authorizing via OAuth you're probably currently asking for permission to access the gmail scope:</p> <pre><code>https://mail.google.com/mail/feed/atom </code></pre> <p>You will also need to ask for permission for the contacts scope:</p> <pre><code>https://www.google.com/m8/feeds/ </code></pre> <p>Once you have that, you can make a GET request similar to the following:</p> <pre><code>https://www.google.com/m8/feeds/contacts/default/full?max-results=1 </code></pre> <p>This should return a bunch of xml, here are some relevant bits:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&amp;quot;CEcMRX0_eCp7ImA9WhdRF00.&amp;quot;"&gt; &lt;id&gt;joebloggs@gmail.com&lt;/id&gt; ... &lt;author&gt; &lt;name&gt;Joe Bloggs&lt;/name&gt; &lt;email&gt;joebloggs@gmail.com&lt;/email&gt; &lt;/author&gt; ... &lt;/feed&gt; </code></pre> <p>As you can see you can find the authorized users' email in a couple of places.</p> <p>If you're using OAuth you might also want to have a look at the Google OAuth playground, I've found it very handy: <a href="http://googlecodesamples.com/oauth_playground/index.php" rel="nofollow">http://googlecodesamples.com/oauth_playground/index.php</a>. If you decide to use OAuth2 there is equivalent tool at <a href="https://code.google.com/oauthplayground/" rel="nofollow">https://code.google.com/oauthplayground</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload