Chrome网上应用店“您无权访问App ID的许可数据:”

我有一个离线的Chrome Web应用程序,我想通过networking商店销售。

它有一个服务器后端。 我希望服务器检查许可证数据。 我怎么做?

这是API 。 这是一个Java HowTo 。 以下是nodejs的OAuth-JWT库 。 我在lib的自述文件中描述了一个新的client-id。

我得到这个回应:

{ error: { errors: [ [Object] ], code: 403, message: 'You don\'t have access to licensing data for App ID: aaaaaaaaaaaaaaaaaaaaaaaaaaaa' } } 

如何在我的服务器上访问我的应用程序的许可证数据?

麦克风

代码如下:

 var appId = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; var userId = '1111111111111111111111'; // obtain a JWT-enabled version of request var request = require('google-oauth-jwt').requestWithJWT(); request({ url: 'https://www.googleapis.com/chromewebstore/v1.1/licenses/'+appId+'/'+userId, jwt: { // use the email address of the service account, as seen in the API console email: '11111111111-aaaaaaaaaaaaaaaaaaaaaaaa@developer.gserviceaccount.com', // use the PEM file we generated from the downloaded key keyFile: 'config/keys/app-11111111111111.pem', // specify the scopes you wish to access - each application has different scopes scopes: ['https://www.googleapis.com/auth/chromewebstore.readonly'] } }, function (err, res, body) { console.log(JSON.parse(body)); }); 

我已经花了很多时间在Chrome网上商店这个和其他小问题上。 与Stripe.com,Braintree或类似的。

Interesting Posts