Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle API Service Account
    primarykey
    data
    text
    <p>I'm trying to connect to the google doubeclick api through a service account (client email and p12 certificate), using the python client library as in the following example:</p> <p><a href="http://code.google.com/p/google-api-python-client/source/browse/samples/service_account/tasks.py" rel="nofollow">http://code.google.com/p/google-api-python-client/source/browse/samples/service_account/tasks.py</a></p> <p>It's returning me an empty access_token:</p> <pre><code>In [9]: type(credentials.access_token) Out[9]: &lt;type 'NoneType'&gt; </code></pre> <p>What is the significance of this? Is there something I am likely doing wrong? I have also tried accessing the tasks api as in the example (thinking that possibly the doubleclick api is not a supported scope) but same result.</p> <p><strong>UPDATE (example code):</strong></p> <pre><code>from oauth2client.client import SignedJwtAssertionCredentials import httplib2 from adspygoogle.dfp import DfpClient f = file('/path/to/.ssh/google-api.p12', 'rb') key = f.read() f.close() credentials = SignedJwtAssertionCredentials('&lt;email&gt;', key, scope='https://www.google.com/apis/ads/publisher') credentials.refresh(http) http = httplib2.Http() http = credentials.authorize(http) client = DfpClient.DfpClient(headers={'networkCode': '&lt;code&gt;', 'applicationName': 'test', 'userAgent': 'test', 'oauth2credentials': credentials}) inventory_service = client.GetInventoryService() inventory_service.getAdUnitsByStatement({'query':''}) </code></pre> <p><strong>ERROR:</strong></p> <p><code>DfpAuthenticationError: [AuthenticationError.NO_NETWORKS_TO_ACCESS @ ]</code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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