Skip to content

Latest commit

 

History

History
88 lines (48 loc) · 6.86 KB

creating-google-service-account.md

File metadata and controls

88 lines (48 loc) · 6.86 KB

Uploading a Google Service Account Key for Play Store Submissions with EAS

A Google Service Account Key is a credential in the form of a JSON file that you can get via Google Cloud for a particular Google Service Account.

EAS requires you to upload and configure a Google Service Account Key to submit your Android app to the Google Play Store with eas submit.

This guides provides steps to create a new service account and its key or re-use an existing service account to create a new key.

Note

From June 2024, all Android notifications must be sent using the FCM v1 protocol. EAS requires a Google Service Account Key to be uploaded and configured for sending Android push notifications via https://exp.host/--/api/v2/push/send using the FCM v1 protocol. You can configure separate Google Service Account Keys for Play Store Submissions and sending Android Push notifications with FCM v1 protocol or you can upload a single Google Service Account Key and use it for both use cases (provided that the correct authorizations are in place for that Service Account in Google Cloud Console).

Set up Service Account Key

To setup a Google Service Account Key for Play Store Submissions via eas submit, the following steps are required:

  • Create a Google Cloud project (optional if you already have one)
  • Create a Google Service Account and create and download the JSON key file
  • Enable the Google Play Android Developer API
  • Invite the Google Service Account to your Google Play Console account
  1. If you don't have a Google Cloud project yet, create one in the Google Cloud Console. If you already have a project, skip this step.

  1. Open Service Accounts in the Google Cloud Console and click Create Service Account.

  1. Enter a name for your service account. We recommend a name that will make it easy for you to remember that it is for your Google Play Console account. Optionally, enter the service account ID and description of your choice. Click the Done button.

  1. From Service Accounts, copy the email ID for your account. You will need this in step 8.

  1. Select Manage keys from the options button, then Create new key. Choose JSON and then click Create. Download the .json file and store it in a safe place.

  1. Open the Google Play Android Developer API and click Enable.

  1. In the Google Play Console, open the Users and permissions and click Invite new users.

  1. Enter the email address of the service account you created in step 4. On the App permissions tab, select your app(s). If you want to apply the permissions to all apps, you can also select the permissions on the Account permissions tab instead.

  1. Select the following required permissions to upload and manage your app, and click Invite user.

  1. Now you can upload your newly created Google Service Account Key to EAS servers and upload your app's release archive to Google Play Store using eas submit.

Download key from an existing service account

If you have already created a Google Service Account, you can create a new JSON key and download it.

  1. Open Google Cloud Console and select your project.

  2. From the sidebar, click Service Accounts > click the existing service account Email.

  1. Click Keys > ADD KEY > Create new key.

  1. Under Key type, make sure JSON is selected, and click Create.

  1. A .json file will download on your computer. You can repeat steps 7 to 10 from the previous section to use this downloaded key.

Further reading

To learn more about how to use eas submit to create an internal test or a production release archive, or automate subsequent releases to Google Play Store with --auto-submit flag, see Android Production build chapter in the EAS Tutorial.

For managing multiple service account keys, see Google's documentation on Best practices for using service accounts.