google-wallet / rest-samples

Samples for the Google Wallet REST APIs
https://developers.google.com/wallet/
Apache License 2.0
265 stars 116 forks source link

Issue when we make an api call #52

Closed abhishekdvms closed 1 year ago

abhishekdvms commented 1 year ago

We are getting error as - "Service account email address did not have edit access on the issuer."

This error appears when we make an api call after creating a service account and given admin role. What could be the issue?

ncalteen commented 1 year ago

Hello!

When you say the service account has the admin role, are you referring to the Google Cloud console or the Google Pay & Wallet Console?

Can you confirm the users tab in the Google Pay & Wallet Console contains the service account email address? It should be something like the following:

service-account-name@project-name.iam.gserviceaccount.com

Screen Shot 2022-12-01 at 9 47 53 AM

abhishekdvms commented 1 year ago

Yes, i can see service account added in users:

image
abhishekdvms commented 1 year ago

56ebca4b-31a6-4165-a581-963d9e3cab94

ncalteen commented 1 year ago

Hello!

Can you check in the Google Cloud Console to confirm that the service account key is still valid for the service account you added in the Google Pay & Wallet Console? I recently ran into the same error, and an expired service account key was to blame.

image

If the key is expired, you will need to generate a new one and then update the GOOGLE_APPLICATION_CREDENTIALS environment variable on your workstation to point to the new key file.

Let me know if this ends up being the case! Otherwise we can keep digging :)

ncalteen commented 1 year ago

Hello again,

We haven't heard back from you in a while regarding this issue. I will go ahead and close this out for the time being. If you're still running into any problems, please feel free to reopen and add any additional details!