質問

I've created a new marketplace app and installed it on my domain. I'm trying to use the appsmarket api to get a list of domains which installed my app, with the following code:

credentials = SignedJwtAssertionCredentials(CLIENT_ID, PRIVATE_KEY, SCOPE)  
http = httplib2.Http()
http = credentials.authorize(http)
service = build(serviceName='appsmarket', version='v2', http=http)
lists = service.licenseNotification().list(
  applicationId=APP_ID, timestamp=0, max_results=10).execute(http=http)

And i get the following error:

apiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/appsmarket/v2/licenseNotification/<APP_ID>?max-results=10&timestamp=0&alt=json returned "Access Not Configured">

According to this answer I should register my server's ip with google, but I didn't find where to do it.

What am I missing?

役に立ちましたか?

解決

Answering my own question.

There are two services with similar names in the Google Cloud Console (or the old API Console):

  • Google Apps Marketplace SDK
  • Google Apps Marketplace API

The second one has to be enabled for the licensing API to work.

他のヒント

Try this:

It's surprisingly hidden. 
Visit code.google.com/apis/console. 
First, make sure the service you want is enabled under "Services". 
Then go to "API Access" and specify your calling domains or IP addresses.

From the comments of the link you gave above

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top