Email Settings API 403 Errors

83 views
Skip to first unread message

Gwyn Howell

unread,
Mar 24, 2012, 6:02:39 AM3/24/12
to google-app...@googlegroups.com
Am finding that the Email Settings API is throwing random 403 errors.

I am using the gdata python API on App Engine. My app spawns a new task for each user in a Google Apps domain, then each task calls the retrieve_signature method. Sometimes this call throws a 403 error. The task will then auto retry. Eventually all tasks will complete. We have noticed that this only tends to happen with larger domains (> 100 users).

An obvious explanation for this, would be we are firing too many requests in too little time and therefore exceeding some kind of hidden quota, but it doesn't make sense that the error should be a 403.

Please advise

Claudio Cherubino

unread,
Mar 25, 2012, 2:21:35 PM3/25/12
to google-app...@googlegroups.com
Hi Gwyn,

Can you help us track down one of those requests that failed so that we can check if we are returning the wrong response code?
Thanks

Claudio

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/NiKcrJK6wYoJ.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Gwyn Howell

unread,
Mar 25, 2012, 5:14:16 PM3/25/12
to google-app...@googlegroups.com
Not sure the best way you'd like me to do this? See below for some sample code - it's a bit crude but examplifies the issue. It fires 100 tasks, each of which retrieves the signature of a given user. If you run you will see that 403s are thrown, but eventually all tasks will complete.

class Test403(webapp.RequestHandler):
  def get(self):
    for _ in range(100):
      taskqueue.add(url='/test403')
  
  def post(self):
    client = EmailSettingsClient(TEST_DOMAIN)
    token = gdata.gauth.token_from_blob(OAUTH2_TOKEN)
    client.auth_token = token
    token.authorize(client)    
    client.retrieve_signature(TEST_EMAIL)

here's the stack trace:
Server responded with: 403, 
Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in __call__
    handler.post(*groups)
  File "/base/data/home/apps/s~appogee-hub/2.357746192348739783/sigs/tasks/sync.py", line 337, in post
    client.retrieve_signature(TEST_EMAIL)
  File "/base/data/home/apps/s~appogee-hub/2.357746192348739783/gdata/apps/emailsettings/client.py", line 487, in retrieve_signature
    return self.GetEntry(uri, auth_token=None, query=None, **kwargs)
  File "/base/data/home/apps/s~appogee-hub/2.357746192348739783/gdata/client.py", line 652, in get_entry
    desired_class=desired_class, **kwargs)
  File "/base/data/home/apps/s~appogee-hub/2.357746192348739783/gdata/client.py", line 319, in request
    RequestError)
RequestError: Server responded with: 403, 

If you have access to App Engine logs, you can see here.

Thanks,
Gwyn

On Sunday, 25 March 2012 19:21:35 UTC+1, Claudio Cherubino wrote:
Hi Gwyn,

Can you help us track down one of those requests that failed so that we can check if we are returning the wrong response code?
Thanks

Claudio

On Sat, Mar 24, 2012 at 3:02 AM, Gwyn Howell <gwyn....@appogee.co.uk> wrote:
Am finding that the Email Settings API is throwing random 403 errors.

I am using the gdata python API on App Engine. My app spawns a new task for each user in a Google Apps domain, then each task calls the retrieve_signature method. Sometimes this call throws a 403 error. The task will then auto retry. Eventually all tasks will complete. We have noticed that this only tends to happen with larger domains (> 100 users).

An obvious explanation for this, would be we are firing too many requests in too little time and therefore exceeding some kind of hidden quota, but it doesn't make sense that the error should be a 403.

Please advise

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/​msg/google-apps-mgmt-apis/-/​NiKcrJK6wYoJ.
To post to this group, send email to google-apps-mgmt-apis@​googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt-apis+​unsub...@googlegroups.com.

Claudio Cherubino

unread,
Mar 26, 2012, 2:37:50 PM3/26/12
to google-app...@googlegroups.com
Hi Gwyn,

I don't have access to the logs unless you add me to the project.
Would it be possible to add me on a temporary basis?
Also, it seems like there is a message after "Server responded with: 403, ", does it help finding out what failed?
Thanks

Claudio

To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/pPpjgvee8ysJ.

To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.

Gwyn Howell

unread,
Mar 26, 2012, 5:04:23 PM3/26/12
to google-app...@googlegroups.com
Uploaded to new App Engine, and added you to the permissions list. You can see the errors in the log.

Thanks,
Gwyn

Claudio Cherubino

unread,
Mar 26, 2012, 6:23:26 PM3/26/12
to google-app...@googlegroups.com
Thanks Gwyn,

I filed an internal bug for the engineers to investigate.
I'll keep you updated

Claudio

To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/wQvHdogAFL0J.

To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.

Gwyn Howell

unread,
Apr 2, 2012, 9:41:34 AM4/2/12
to google-app...@googlegroups.com
Hi Claudio,

Do you have any update on this? As more and more of our user base are reporting the issue.

Thanks,

Gwyn Howell
Solutions Developer

Email gwyn....@appogee.co.uk
Direct Line+44 (0) 1344 386175 5
Google+links.appogee.co.uk/plus
Websitewww.appogee.co.uk

Manage GMail signatures like this using Appogee Signatures

Claudio Cherubino

unread,
Apr 2, 2012, 1:38:42 PM4/2/12
to Gwyn Howell, google-app...@googlegroups.com
Hi Gwyn,

Unfortunately no updates yet.
I bumped the priority on the internal bug and I hope to get back to you soon.

Claudio
Reply all
Reply to author
Forward
0 new messages