Google Play Integrity Setup¶
This guide walks you through setting up Google Play Integrity to validate that requests to ProxLock come from legitimate Android devices.
Overview¶
Google Play Integrity is Google's solution for verifying the authenticity and integrity of Android apps. When integrated with ProxLock, it ensures that API requests are coming from genuine, unmodified versions of your app running on real Android devices.
Prerequisites¶
Before you begin, you'll need:
- A Google account with access to the Google Cloud Console
- Your Android app's package name (e.g.,
com.example.myapp) - Access to the ProxLock web dashboard
Step 1: Create a Google Cloud Project¶
- Go to the Google Cloud Console
- Click on the project dropdown at the top of the page
- Click "New Project"
- Enter a Project name (e.g., "My App Play Integrity")
- Select your Organization and Location if applicable
- Click "Create"
- Wait for the project to be created, then select it from the project dropdown
Step 2: Enable the Play Integrity API¶
Enable the Play Integrity API in the Google Cloud Console.
Step 3: Create a Service Account¶
- In your Google Cloud project, go to IAM & Admin > Service Accounts
- Click "+ Create Service Account"
- Enter a Service account name (e.g., "proxlock-play-integrity")
- The Service account ID will be auto-generated
- Optionally add a description
- Click "Create and Continue"
- Skip the permissions step - no additional permissions are needed for Play Integrity
- Click "Continue", then "Done"
Step 4: Download the Service Account Key¶
- In the Service Accounts list, find the service account you just created
- Click the three-dot menu (⋮) on the right side of the row
- Select "Manage keys"
- Click "Add Key" > "Create new key"
- Select "JSON" as the key type
- Click "Create"
- The JSON key file will be automatically downloaded to your computer
- Keep this file secure - it provides access to your Google Cloud project
Important: Store the downloaded JSON key file securely. Anyone with access to this file can use your service account.
Step 5: Upload to ProxLock¶
- Log in to the ProxLock web dashboard
- Navigate to your project
- Scroll to the Google Play Integrity section
- Click "+ Upload Play Integrity Key"
- Enter your Android Package Name (e.g.,
com.example.myapp) - Upload or paste your Service Account JSON key
- Click "Upload"
Once uploaded, you'll see the configuration details including the service account client email.
Using Play Integrity with ProxLock¶
After completing the setup, your Android app can use the play-integrity validation mode when making proxy requests. Include the Play Integrity token in your requests:
For more details on making proxy requests, see the REST API Guide.
Android SDK¶
Coming Soon: A ProxLock Android SDK is in development to simplify Play Integrity integration in your Android apps. Stay tuned for updates!
Troubleshooting¶
API Not Enabled Error¶
If you receive an error about the Play Integrity API not being enabled, verify that:
- You've enabled the API in the correct Google Cloud project
- The service account belongs to the same project where the API is enabled
Invalid Token Errors¶
If Play Integrity tokens are being rejected:
- Ensure your app's package name matches exactly what you configured in ProxLock
- Verify that your app is signed with the correct signing key
- Check that the Play Integrity API is properly integrated in your Android app
Service Account Issues¶
If there are issues with your service account:
- Verify the JSON key file is complete and not corrupted
- Ensure you're using the correct service account key
- Try generating a new key if problems persist
Next Steps¶
- REST API Guide - Learn how to make proxy requests with Play Integrity validation
- Web Dashboard Guide - Manage your projects and API keys
- Getting Started - Overview of ProxLock