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.
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.
google-play-console-setup-api-access
1.3 On the new page(Google Play Developer API Guides), simply click on "Google CloudConsole" 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.)
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.
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".
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
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:
google-cloud-service-account-select-role
Click on "Select a role" and choose "Project>Owner".
google-cloud-grant-service-account-access
After selecting the appropriate role, click on "Continue".
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.
newly-created-service-account
2.4 Go to the "KEYS" panel and click on "Add Key". Then, select the option "Create New Key".
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.
When the Cloud Pub/Sub API is successfully enabled, it will appear as follows:
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”
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.
google-play-console-invite-users
4.3 On the App permissions, add the app you want the user to have access to.
grant-app-permission
4.4 Then choose "Account permissions", check "Admin (all permissions)" then "Invite user".
grant-account-permission
3.5 Click "Send invite" on the confirmation pop-up.
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.
user-account-status-never-expires
5. Upload Google service account keys to Appflow.ai Dashboard
5.1 Go toAppflow.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.
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.
appflow.ai-edit-app
5.3 On the application editing page, Find the “Google Play Keys“ section. Click "Upload serviceaccount key file", and upload the keys that you downloaded earlier.
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.