title: Google Docs: Cannot export/download user's document using administrative access/impersonation (forbidden 403) in python
body: <p>I have read this thoroughly: <a href="https://developers.google.com/google-apps/documents-list/#using_google_apps_administrative_access_to_impersonate_other_domain_users" rel="nofollow">https://developers.google.com/google-apps/documents-list/#using_google_apps_administrative_access_to_impersonate_other_domain_users</a>
  I have googled this to death.</p>
  
  <p>So far I have been able to:</p>
  
  <ol>
  <li><p>Authorise with:</p>
  
  <ul>
  <li>clientLogin</li>
  <li>OAuth tokens (using my domain key) </li>
  </ul></li>
  <li><p>retrieve document feeds for all users in the domain (authorised either way in #1)<br/>
  I am using the "entry" from the feed to Export/Download documents and always get forbidden for other users for documents not shared with admin. The feed query I am using is like:
  <code>https://docs.google.com/feeds/userid@mydomain.com/private/full/?v=3</code>
  (I have tried with and without the ?v=3)</p></li>
  </ol>
  
  <p>I have also tried adding the xoauth_requestor_id (which I have also seen in posts as xoauth_requestor), both on the uri, and as a client property: <code>client.xoauth_requestor_id = ...</code></p>
  
  <p>Code fragments:</p>
  
  <p>Client Login (using administrator credentials):</p>
  
  <pre><code>client.http_client.debug = cfg.get('HTTPDEBUG')
  client.ClientLogin( cfg.get('ADMINUSER'), cfg.get('ADMINPASS'), 'HOSTED' )
  </code></pre>
  
  <p>OAuth:</p>
  
  <pre><code>client.http_client.debug = cfg.get('HTTPDEBUG')
  client.SetOAuthInputParameters( gdata.auth.OAuthSignatureMethod.HMAC_SHA1, cfg.get('DOMAIN'), cfg.get('APPS.SECRET') )
  oatip = gdata.auth.OAuthInputParams( gdata.auth.OAuthSignatureMethod.HMAC_SHA1, cfg.get('DOMAIN'), cfg.get('APPS.SECRET') )
  oat = gdata.auth.OAuthToken( scopes = cfg.get('APPS.%s.SCOPES' % section), oauth_input_params = oatip )
  oat.set_token_string( cfg.get('APPS.%s.TOKEN' % section) )
  client.current_token = oat
  </code></pre>
  
  <p>Once the feed is retrieved:</p>
  
  <pre><code># pathname eg whatever.doc
  client.Export(entry, pathname)
  # have also tried
  client.Export(entry, pathname, extra_params = { 'v': 3 } )
  # and tried
  client.Export(entry, pathname, extra_params = { 'v': 3, 'xoauth_requestor_id': 'admin@mydomain.com' } )
  </code></pre>
  
  <p>Any suggestions, or pointers as to what I am missing here?
  Thanks</p>