0
class DirectoryV1Handler(webapp2.RequestHandler):
  @decorator.oauth_required
  def get(self):
    https = httplib2.Http()
    https = decorator.credentials.authorize(https)
    #service = build('directory', 'v1', http=https)
    service = build('admin', 'directory_v1', http=https, developerKey="YOUR-API-CONSOLE-KEY")
    #json.dumps(service)
    logging.info(service.userphoto().get(userKey='userKey'))
    user = service.userphoto().get(userKey='userKey').execute()
    logging.info(user)

When running the above I get the following error, please provide help: HttpError 403 when requesting https://www.googleapis.com/admin/directory/v1/users/{userKey}?alt=json&key="YOUR-API-CONSOLE-KEY" returned "Insufficient Permission"

1
  • well 403 says it all, you dont have permission for that resource. Commented Sep 6, 2013 at 4:44

1 Answer 1

1

You need to replace YOUR-API-CONSOLE-KEY with the key found in APIs Console

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.