IntegrityTokenRequest.Builder

public abstract class IntegrityTokenRequest.Builder


Builder for IntegrityTokenRequest.

Summary

Public constructors

Public methods

abstract IntegrityTokenRequest

Builds a IntegrityTokenRequest.

abstract IntegrityTokenRequest.Builder
setCloudProjectNumber(long cloudProjectNumber)

A cloud project number to link to the integrity token.

abstract IntegrityTokenRequest.Builder

A nonce to bind the integrity token to.

Public constructors

Builder

public Builder()

Public methods

build

public abstract IntegrityTokenRequest build()

Builds a IntegrityTokenRequest.

setCloudProjectNumber

public abstract IntegrityTokenRequest.Builder setCloudProjectNumber(long cloudProjectNumber)

A cloud project number to link to the integrity token.

This field is required for apps exclusively distributed outside of Google Play and SDKs. For apps distributed on Google Play, the cloud project number is configured in the Play Console and need not be set on the request.

Cloud project number can be found in Project info in your Google Cloud Console for the cloud project where Play Integrity API is enabled.

Calls to decrypt the token on Google's server must be authenticated using the cloud account that was linked to the token in this request.

setNonce

public abstract IntegrityTokenRequest.Builder setNonce(String nonce)

A nonce to bind the integrity token to.

It must be base64 encoded in web-safe no-wrap form.

See details about the nonce requirements and recommendations.