1
오프라인 Chrome 웹 앱이 있습니다. 웹 스토어를 통해 판매하고 싶습니다.Chrome 웹 스토어 '앱 ID에 대한 라이선스 데이터에 액세스 할 수 없습니다.'
서버 백엔드가 있습니다. 서버에서 라이센스 데이터를 확인하고 싶습니다. 어떻게해야합니까?
여기는 API입니다. 여기에 Java HowTo이 있습니다. 다음은 OAuth-JWT lib for nodejs입니다. lib의 readme에 설명 된대로 새로운 클라이언트 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: '[email protected]om',
// 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));
});