如何获得Google市场通知 [英] How to get Google marketplace notification
问题描述
我创建了一个新的市场应用程序并将其安装在我的域中。我试图使用appsmarket api来获取安装我的应用的域名列表,使用以下代码:
凭证= 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)
我得到以下错误:
apiclient.errors.HttpError:当请求https://www.googleapis.com/appsmarket/v2/licenseNotification/<APP_ID>?max-results=10×tamp=0&alt=json时,< HttpError 403 访问未配置>
根据这个答案我应该注册我的服务器的IP与谷歌,但我没有找到在哪里做。
我缺少什么?
回答我自己的问题。
Google云端控制台(或旧版API控制台):
必须启用第二个才能使授权API生效。
>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×tamp=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.
这篇关于如何获得Google市场通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!