Re: [gs-discussion] JSON API

57 views
Skip to first unread message

Nathan Herring (Google Cloud Storage Team)

unread,
Sep 18, 2012, 1:54:49 AM9/18/12
to gs-dis...@googlegroups.com
On Sun, Sep 16, 2012 at 1:33 AM, Rene Bolldorf <r...@radix.io> wrote:
Hi guys,

I use Google Apps and I created a new domain group and added my app engine service account as member,
I registered the group as team member to my api project.
But if try to access the json api with the access token from gae I get a dailyLimitExceededUnreg error. 

Any tips or isn't it possible at the moment?
I use a api key as a workaround.

As far as the Google APIs is concerned, the project associated with your GAE app does not have the JSON API turned on. Are you using the API key for another project? If you want to use that other project with your GAE app, you'll have to use the second project's robot account instead of the GAE app's access token. Or you can request to have the JSON API turned on for your GAE project. Either should work.

Cheers,
Nathan
Google Cloud Storage Team

Rene Bolldorf

unread,
Sep 19, 2012, 3:05:39 AM9/19/12
to gs-dis...@googlegroups.com, gs-...@google.com
My problem is: I use a custom domain and I can't add team members from another domain to my google code project.
I created a new group in my google apps control panel and added the GAE service account as member to the group,
then I added the new group to my google code project as team member.

But it doesn't work and the json api is turned on of course.

looks like this:
| -> myapp@appspot.gserviceaccount.com (member)

myproject
| -> Team
      | -> a...@domain.com

Navneet (Google)

unread,
Sep 19, 2012, 1:16:07 PM9/19/12
to gs-dis...@googlegroups.com
Rene,

You could ask your domain administrator to remove the project restriction that forces only members of your domain to permissible in your projects.

Alternatively, you could create the project with a non-domain account, then add your domain users and service account to it, and set the project billing administrator to the right person.

HTH,
Navneet

--
 
 

Rene Bolldorf

unread,
Sep 19, 2012, 1:34:07 PM9/19/12
to gs-dis...@googlegroups.com
Oh? I'm the administrator, where can I find this setting?

On Wed, Sep 19, 2012 at 7:16 PM, Navneet (Google) <gs-...@google.com> wrote:
> Rene,
>
> You could ask your domain administrator to remove the project restriction
> that forces only members of your domain to permissible in your projects.
>
> Alternatively, you could create the project with a non-domain account, then
> add your domain users and service account to it, and set the project billing
> administrator to the right person.
>
> HTH,
> Navneet
>
>
> On Wed, Sep 19, 2012 at 12:05 AM, Rene Bolldorf <r...@radix.io> wrote:
>>
>> My problem is: I use a custom domain and I can't add team members from
>> another domain to my google code project.
>> I created a new group in my google apps control panel and added the GAE
>> service account as member to the group,
>> then I added the new group to my google code project as team member.
>>
>> But it doesn't work and the json api is turned on of course.
>>
>> looks like this:
>> a...@domain.com (Team)
>> | -> my...@appspot.gserviceaccount.com (member)
>>
>> myproject
>> | -> Team
>> | -> a...@domain.com
>>
>> On Tuesday, September 18, 2012 7:54:51 AM UTC+2, Nathan Herring (Google
>> Cloud Storage Team) wrote:
>>>
>>> On Sun, Sep 16, 2012 at 1:33 AM, Rene Bolldorf <r...@radix.io> wrote:
>>>>
>>>> Hi guys,
>>>>
>>>> I use Google Apps and I created a new domain group and added my app
>>>> engine service account as member,
>>>> I registered the group as team member to my api project.
>>>> But if try to access the json api with the access token from gae I get a
>>>> dailyLimitExceededUnreg error.
>>>>
>>>>
>>>> Any tips or isn't it possible at the moment?
>>>> I use a api key as a workaround.
>>>
>>>
>>> As far as the Google APIs is concerned, the project associated with your
>>> GAE app does not have the JSON API turned on. Are you using the API key for
>>> another project? If you want to use that other project with your GAE app,
>>> you'll have to use the second project's robot account instead of the GAE
>>> app's access token. Or you can request to have the JSON API turned on for
>>> your GAE project. Either should work.
>>>
>>> Cheers,
>>> Nathan
>>> Google Cloud Storage Team
>>
>> --
>>
>>
>
>
> --
>
>

Navneet (Google)

unread,
Sep 19, 2012, 7:02:05 PM9/19/12
to gs-dis...@googlegroups.com
Rene,

I mis-spoke, there isn't a way to change this from the admin console. Please create the project using a non-domain account (which you can then remove from the project after you've added the service account and the domain users as owners).

Sorry for the confusion.

- Navneet

--



Rene Bolldorf

unread,
Sep 19, 2012, 8:45:02 PM9/19/12
to gs-dis...@googlegroups.com
Thanks you.
> --
>
>

Rene Bolldorf

unread,
Oct 9, 2012, 4:23:19 PM10/9/12
to Google Storage Team, gs-dis...@googlegroups.com
For OAuth2, I request a access token in GAE and set the
'Authorization' header. Example for python:

from google.appengine.api.app_identity import get_access_token
from google.appengine.api.urlfetch import fetch

url = 'https://www.googleapis.com/storage/v1beta1/b/MY_BUCKET/o'
token = get_access_token('https://www.googleapis.com/auth/devstorage.read_only')[0]
response = fetch(url, None, 'GET', { 'Authorization' : 'Bearer ' +
token }, False, False, None, True)
.....

When I provide a api key it just works fine.

On Tue, Oct 9, 2012 at 9:57 PM, Google Storage Team <gs-...@google.com> wrote:
> Original Message Follows:
> ------------------------
> From: Rene Bolldorf <r...@radix.io>
> Subject: Re: [gs-discussion] JSON API
> Date: Wed, 19 Sep 2012 00:05:39 -0700 (PDT)
>
>> My problem is: I use a custom domain and I can't add team members from
>> another domain to my google code project.
>> I created a new group in my google apps control panel and added the GAE
>> service account as member to the group,
>> then I added the new group to my google code project as team member.
>>
>> But it doesn't work and the json api is turned on of course.
>>
>> looks like this:
>> a...@domain.com (Team)
>> | -> my...@appspot.gserviceaccount.com (member)
>>
>> myproject
>> | -> Team
>> | -> a...@domain.com
>
> The error you're reporting is not one of user/service-account
> authentication, but rather one of project authentication. Your placement
> of a service account entry as a team member seems perfectly fine. The
> problem is that when you're accessing the API, without specifying a
> project, as documented at
> https://developers.google.com/storage/docs/json_api/. Are you using a
> developer key or an OAuth token? If an OAuth token, how are you getting
> the token? You'll need to use one or the other.
>
>>
>> On Tuesday, September 18, 2012 7:54:51 AM UTC+2, Nathan Herring (Google
>> Cloud Storage Team) wrote:
>> >
>> > On Sun, Sep 16, 2012 at 1:33 AM, Rene Bolldorf
> <r...@radix.io<javascript:>
Reply all
Reply to author
Forward
0 new messages