bitrise-steplib / steps-google-play-deploy

MIT License
54 stars 38 forks source link

googleapi: Error 403: Forbidden, forbidden #53

Closed alexshikov closed 5 years ago

alexshikov commented 5 years ago

When I'm trying to upload a new alpha build, I get an exception that I can't actually understand:

Authenticating
Authenticated client created

Create new edit
Failed to perform edit insert call, error: googleapi: Error 403: Forbidden, forbidden

The only concern I have, there is no production/beta builds in the Dev Console, can this be the case?

What would you recommend to try/check?

fehersanyi-bitrise commented 5 years ago

Hello @alexshikov

Are you sure that you defined every permission in the JSON file?

4. Grant the necessary rights to the service account:

    Visit the [Google Play Console](https://play.google.com/apps/publish) -> Settings -> Users & permissions -> Invite new user.
    Due to the way the Google Play Publisher API works, you have to grant at least the following permissions to that service account:
      - ACCESS LEVEL: View app information
      - RELEASE MANAGEMENT: Manage production releases, Manage testing track releases
      - STORE PRESENCE: Edit store listing, pricing & distribution

from: https://github.com/bitrise-steplib/steps-google-play-deploy/blob/master/step.yml#L24

alexshikov commented 5 years ago

Thank you @fehersanyi-bitrise ! We've missed it indeed. Adding permission helped.

mobile-dualbootpartners commented 4 years ago

You can also create a service account to access the API from a build server without providing your personal user credentials:

  1. Go to the API Access page on the Google Play Console.
  2. Under Service Accounts, click Create Service Account.
  3. Follow the instructions on the page to create your service account.
  4. Once you've created the service account on the Google Developers Console, click Done. The API Access page automatically refreshes, and your service account will be listed.
  5. Click Grant Access to provide the service account the necessary rights to perform actions.