class ApiCallHandler(handler.ApiCallHandler):

    def CheckIsAdmin(self):
        """Determine if admin access should be granted based on the
           auth cookie passed with the request."""
login_cookie = self.request.cookies.get('dev_appserver_login', '')
match = cookie_re.search(login_cookie)
if match and match.group(1
    ) == MY_SECRET_KEY and 'X-appcfg-api-version' in self.request.headers:
    return True
else:
    self.redirect('/_ah/login')
return False
app = webapp.WSGIApplication([('.*', ApiCallHandler)])
appcfg.py shows You must be logged in as an administrator