Skip to content

Play Integrity

Non-Visible component
Category Requires Version
Google API 21, Android 5.0 Lollipop 1

Overview

A non-visible component that lets you connect to the Google Play Integrity API to request integrity tokens and verify with verdicts the authenticity of your app, device, and user.

Events

Error Occurred

Event triggered when an error occurs during Google Play Integrity API operations. The errorCode parameter contains the specific error code from the API, and the message parameter provides a human-readable description of the error that occurred.

Params
error Code Number
message Text

Integrity Token Received

Event triggered when a valid integrity token has been successfully obtained from the Google Play Integrity API. The token parameter contains the encoded integrity token that can be sent to your server for verification, and the requestHash parameter contains the original request hash that was used to generate this token.

Params
token Text
request Hash Text

Retryable Error Occurred During Warmup

Event triggered when a recoverable error occurs during the integrity provider warm-up process. IMPORTANT NOTE: No user action is required as the system automatically retries the operation up to 3 times with exponential backoff in the background. The errorCode parameter contains the specific error code, and the message parameter provides details about the error condition.

Params
error Code Number
message Text

Methods

Is Provider Ready

Returns: Boolean

Checks if the Google Play Integrity API token provider has been initialized and is ready to generate integrity tokens. Returns true if the provider is available and properly configured, false otherwise.

Request Integrity Token

Initiates a request to obtain an integrity token from Google Play Integrity API using the specified request hash. The request hash should be a unique identifier for this specific integrity verification request. Upon completion, either IntegrityTokenReceived or ErrorOccurred event will be triggered.

Params
request Hash Text