Google Service Account Key

Discover how to get the Google Service Account Key and upload it to Appflow.ai for server-side purchase validations.

To enable server-side purchase verification, the Google Service Account Key is essential. Without it, Appflow.ai cannot validate and process transactions. To obtain and upload the service account key to Appflow.ai, follow the guide below.

Procedures:

1. Create a new Appflow.ai project in the Google Cloud Console

2. Create a Service Account in the Google Cloud Console

3. Enable APIs in the Google Cloud Console

4. Adding the Service Account as a user in the Google Play Console

5. Upload Google Service Account Keys to Appflow.ai Dashboard

1. Create a new Appflow.ai project in the Google Cloud Console

1.1 Head to the Google Play Console and log in.

1.2 First, click on "Setup" located on the left-hand side and then select "API Access". Once you have clicked on "API Access", you will be directed to the following page. From there, simply click on "Learn more about Publishing API setup" to navigate to a new page.

This is the instruction screen that directs users to Google Play Console>Setup>API access
google-play-console-setup-api-access

1.3 On the new page(Google Play Developer API Guides), simply click on "Google Cloud Console" to initiate the creation of a new Google Cloud project. (Please note that if you already have a Google Cloud Project that you wish to use, you can skip this step.)

This is the screenshot of the Google Play Developer API interface
google-play-developer-api

1.4 On the New Project screen, enter the Project Name. For example, you may use "my-app-name-appflowai-access". Let the location remain as it is and proceed to click "Create". Then a new project is created.

Screenshot for creating a new Google Cloud project
google-console-create-new-project

2. Create a Service Account in the Google Cloud Console

2.1 After the new project has been successfully created, you will be redirected to the page below. Please select "Create Service Account".

Instruction screenshot for creating a new service account
google-cloud-create-service-account

2.2 In the popup window, fill out the following information:

  • Service Account Name

  • Service Account ID

  • Service Account Description

Instruction screenshot for filling out store account information
google-cloud-service-account-setting

Make sure to copy the email address located below the Service Account ID for later use. Once you have filled out the necessary information, click on "CREATE AND CONTINUE" to proceed.

You will be directed to the "Grant this service account access to project" section:

Instruction for granting the proper access for Google service account
google-cloud-service-account-select-role

Click on "Select a role" and choose "Project>Owner".

Instruction for grant owner access for Google service account key
google-cloud-grant-service-account-access

After selecting the appropriate role, click on "Continue".

Instruction for finalizing the creation of the Google service account key
goole-cloud-service-accout-finalize-the setting

Next, you will reach the "Grant users access to this service account" section. Leave this section blank (no need to enter any information) and click on the "DONE" button below to finalize the process.

2.3 Upon completion, you will be presented with the page below, displaying the newly created service account. Click on the account (hyperlinked) to proceed.

Screenshot that shows a new service account is created
newly-created-service-account

2.4 Go to the "KEYS" panel and click on "Add Key". Then, select the option "Create New Key".

Instruction on how to reach the Google key downloading page
google-cloud-create-new-key

2.5 Within the pop-up window, select "JSON" and proceed by clicking on "CREATE". This action will initiate the downloading of the JSON file to your computer. This downloaded file is the one to be uploaded to Appflow.ai.

Instruction on creating a service account Json key
google-cloud-create-json

3. Enable APIs in the Google Cloud Console

3.1 Go to the Google Play Android Developer API page and click "Enable".

This is the page of Google Android developer API
enable-google-pay-android-developer-api

When the Google Play Android Developer API is successfully enabled, it will appear as follows:

This is the page of Google Android developer API that shows "Enabled“
google-pay-android-developer-api-enabled

3.2 Go to the Google Play Developer Reporting API page and click “Enable”.

This is the page of Google Play Developer Reporting API
enable-google-play-developer-reporting-api

When the Google Play Developer Reporting API is successfully enabled, it will appear as follows:

This is the page of Google Play Developer Reporting API that shows "Enabled“
google-play-developer-reporting-api-enabled

3.3 Go to the Cloud Pub/Sub API page and click “Enable”.

This is the page of Google Pub/Sub API
enable-cloud-pub-sub-api

When the Cloud Pub/Sub API is successfully enabled, it will appear as follows:

This is the page of Google Pub/Sub API that shows "Enabled“
cloud-pub-sub-api-enabled

4. Adding the Service Account as a user in the Google Play Console

4.1 Go to Users and permissions in the Google Play Console and click on “Invite new users

This is the instruction screenshot on how to reach the User and permissions in the Google Play Console
google-play-console-users-and-permissions

4.2 On the page that opens, paste the copied email address(the one you just created in step 2 of this guide) into the "Email address" Section and leave "Access expiry" unchecked.

This is a guide on how to invite google service account as a user in the google search console
google-play-console-invite-users

4.3 On the App permissions, add the app you want the user to have access to.

This is the guide screenshot on how to grant service accounts access to specific apps
grant-app-permission

4.4 Then choose "Account permissions", check "Admin (all permissions)" then "Invite user".

This is a guide on how to grant account permission for service account
grant-account-permission

3.5 Click "Send invite" on the confirmation pop-up.

The screenshot of sending invites to the service accounts
google-play-console-send-invite

Then in the "Users and permissions" section, the service account email address should be there with an active status and "Never expires" underneath.

The status of the invited service account shows “Never expires“
user-account-status-never-expires

5. Upload Google service account keys to Appflow.ai Dashboard

5.1 Go to Appflow.ai>Settings, then on the right panel, find Applications, and click on “Manage” beneath it. You will then be directed to the app listing page.

The guide on how to reach applications listing page in Appflow.ai
appflow.ai-settings-applications

5.2 Find the app you want(you need to add an app if you haven’t done it), and click “Edit” to access the application editing page.

This is the instruction screenshot on how to edit an app in Appflow.ai
appflow.ai-edit-app

5.3 On the application editing page, Find the “Google Play Keys“ section. Click "Upload service account key file", and upload the keys that you downloaded earlier.

The guide on how to upload Google service account key file to Appflow.ai
appflow.ai-upload-service-accout-key-file

If you have completed the process correctly, the RTDN topic should be generated automatically below. Copy it, and set up the Real-time Developer Notifications.

The RTDN topic is generated automatically after uploading the Google play key
appflow.ai-rtdn-topic-name

Last updated

Was this helpful?