You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+149-3Lines changed: 149 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,11 @@ Table of contents
17
17
2. Installation
18
18
3. Google Play (`receipt` + `signature`)
19
19
4. Google Play (verification)
20
+
21
+
- Setting up Google Service Account Credentials
22
+
- Usage Example (with file path)
23
+
- Usage Example (with credentials dictionary)
24
+
20
25
5. Google Play (verification with result)
21
26
6. Google Play (consuming products)
22
27
7. App Store (`receipt` + using optional `shared-secret`)
@@ -94,6 +99,95 @@ An additional example showing how to authenticate using dict credentials instead
94
99
95
100
4. Google Play verification
96
101
===========================
102
+
103
+
Setting up Google Service Account Credentials
104
+
----------------------------------------------
105
+
106
+
Before using Google Play verification, you need to set up a Google Service Account and obtain the credentials file. This section explains what ``GOOGLE_SERVICE_ACCOUNT_KEY_FILE`` is and how to obtain it.
107
+
108
+
**What is GOOGLE_SERVICE_ACCOUNT_KEY_FILE?**
109
+
110
+
``GOOGLE_SERVICE_ACCOUNT_KEY_FILE`` is a JSON file containing a service account's private key and credentials. This file authorizes your application to access the Google Play Developer API to verify in-app purchases and subscriptions.
111
+
112
+
The credentials can be provided in two ways:
113
+
114
+
1. **As a file path** (string): Path to the JSON key file downloaded from Google Cloud Console
115
+
2. **As a dictionary** (dict): The parsed JSON content of the key file
116
+
117
+
**How to obtain the Service Account Key File:**
118
+
119
+
1. **Link Google Cloud Project to Google Play Console**
120
+
121
+
- Go to `Google Play Console <https://play.google.com/console>`_
122
+
- Select your app
123
+
- Navigate to **Settings → Developer account → API access**
124
+
- If you haven't linked a project yet, click **Link** to create or link a Google Cloud project
125
+
- Accept the terms and conditions
126
+
127
+
2. **Create a Service Account**
128
+
129
+
- In the API access page, scroll to **Service accounts**
130
+
- Click **Create new service account** or **Learn how to create service accounts** (this will take you to Google Cloud Console)
131
+
- In Google Cloud Console:
132
+
133
+
- Go to **IAM & Admin → Service Accounts**
134
+
- Click **+ CREATE SERVICE ACCOUNT**
135
+
- Enter a name (e.g., "InAppPy Validator") and description
136
+
- Click **CREATE AND CONTINUE**
137
+
- Skip granting roles (not needed for this step)
138
+
- Click **DONE**
139
+
140
+
3. **Grant Permissions in Google Play Console**
141
+
142
+
- Return to Google Play Console → **Settings → Developer account → API access**
143
+
- Find your newly created service account in the list
0 commit comments