"Access to the application identifier is not allowed" when trying to access the license API

here is the current code:

SCOPES = [
  'https://www.googleapis.com/auth/appsmarketplace.license'
]

def getAppService():
  CREDENTIALS_ = appengine.AppAssertionCredentials(scope=SCOPES)
  http = httplib2.Http(memcache)
  http = CREDENTIALS_.authorize(http)
  service = discovery.build(serviceName = 'appsmarket', version='v2', http=http)
  return service

def getLicenseNotifications():
  service = getAppService()
  ret = service.licenseNotification().list(applicationId='THE_PROJECT_ID_NUMBER', timestamp=0, max_results=10).execute()
  logging.debug(ret)
  return ret

but he got 403 with "Access to the application id is not allowed." this code is called from the GAE project as a default built-in service account within the same project with the exact same project identifier as the manifest.json api_console_project_id application field on the market.

I was looking for an error message, but received unrelated information.

The "Google Apps Marketplace API" is definitely included in the developer console.

if I replace 'v2' with 'v2sandbox', it seems that the timeout then reports a Backend error.

any help?

+4
1

, GAE, api. SignedJwtAssertionCredentials, , . GAE merketplace api.

, Google Apps, . "sub =" initedwithAssertionCredentials, , . , , , , api auth . GAE .

0

All Articles