google-cloud-node: Not access data from Google Play
When requesting files from the bucket “pubsite_prod_rev_ххххх” answer is always “Forbidden” (status code 403). Example code:
var gcloud = require('gcloud');
var storage = gcloud.storage({
projectId: '1xxxxxxxx',
keyFilename: './json_api_key.json'
});
var bucket = storage.bucket("pubsite_prod_rev_1xxxxxxxxx");
bucket.getFiles({
prefix: "reviews"
}, function (err, files, nextQuery, apiResponse) {
if (nextQuery) {
// nextQuery will be non-null if there are more results.
bucket.getFiles(nextQuery, function (err, files, nextQ, apiResponse) {
});
}
if(files == null) { // always Forbidden
console.log(err.message);
}else{
console.log(files);
}
});
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 63 (29 by maintainers)
Commits related to this issue
- chore(main): release 3.0.3 (#651) * chore(main): release 3.0.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.m... — committed to googleapis/google-cloud-node by release-please[bot] 2 years ago
- fix: update proto definitions(#651) fix: update proto definitions Source-Link: https://github.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-d... — committed to googleapis/google-cloud-node by gcf-owl-bot[bot] 2 years ago
- chore: add config files for cloud-rad for node.js (#651) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5e903f... — committed to googleapis/google-cloud-node by yoshi-automation 4 years ago
- build: automate generation and updates with OwlBot (#651) refactor!: IPProtocol enum has been renamed to IPProtocolEnum samples: adds generated samples Release-As: v3.1.0 — committed to googleapis/google-cloud-node by summer-ji-eng 3 years ago
I’m afraid to jinx it, but seems it works. Why I didn’t think about that? 😃
@beshkenadze : Any chance you can try adding your service account as a user in the Play Devconsole? That is, in the JSON keyfile you’ll see an e-mail address… Can you try adding that e-mail to the list of users authorized to your Play account?