Open bhavya3024 opened 4 months ago
Hi @bhavya3024! Not sure why I'm tagged in this issue, but I'd never complain about being mentioned in the same sentence as Jon Skeet 😉
I'm not using the nodejs client library, but here are some ideas:
["https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/pubsub"]
By the way, Owner is generally too broad for service accounts - to consume Pub/Sub messages, the SA needs the Pub/Sub Subscriber (roles/pubsub.subscriber)
) role on the subscription at least.
Hi @andrelaszlo I use AWS Lambda in backend, if I try to use ADC config file and use them inside lambda, will it work ?
Hi @andrelaszlo I use AWS Lambda in backend, if I try to use ADC config file and use them inside lambda, will it work ?
Something like that, yeah. I think you can fetch secrets from AWS Secret Manager and store them in GOOGLE_APPLICATION_CREDENTIALS for example. Use a service account key though.
Hi there, I used google cloud pub/sub api to receive messages using the endpoint url, here I was able to receive events in the backend, but when I tried getting subscription details using the
service account
credentails, I got permission denied. It worked successfully when tried using OAuth redirecting to the browser, but I need to handle it in the backend to store/modify subscription details in the database, so OAuth2 doesn't seem to be viable option.I have tried the following code snippet.
The error I am getting is:
these are permissions I saw in the google cloud console.![image](https://github.com/googleapis/google-api-nodejs-client/assets/15158756/32aac519-78c0-4b15-8b20-fc0187f9683c)
Don't know what to do in this case! Thanks in advance! @proppy @dazuma @jskeet @hansoksendahl @andrelaszlo