# Google.Play.Integrity.IntegrityTokenRequest

Request for [IntegrityManager.RequestIntegrityToken](https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityManager#classGoogle_1_1Play_1_1Integrity_1_1IntegrityManager_1a1dcfd0e7f77001135c708d6420d0b98e).

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityTokenRequest#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenRequest_1aa6581988855c5d50c723f92700611ebe(string nonce, long? cloudProjectNumber)` Constructor. ||

| ### Properties ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityTokenRequest#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenRequest_1ad936c14debfeafadc0118bbb3f50ea78` | `long` A cloud project number to link to the integrity token. |
| `https://developer.android.com/reference/unity/class/Google/Play/Integrity/IntegrityTokenRequest#classGoogle_1_1Play_1_1Integrity_1_1IntegrityTokenRequest_1a76cc4c09fe859e4ee0ae18ff212b762b` | `string` A nonce to bind the integrity token to. |

## Properties

### CloudProjectNumber

```c#
long CloudProjectNumber
```
A cloud project number to link to the integrity token.

This field is required for [apps exclusively distributed outside of Google Play](https://developer.android.com/google/play/integrity/setup#apps-exclusively-distributed-outside-google-play) and [SDKs](https://developer.android.com/google/play/integrity/setup#sdks). For apps distributed on [Google](https://developer.android.com/reference/unity/namespace/Google#namespaceGoogle)[Play](https://developer.android.com/reference/unity/namespace/Google/Play#namespaceGoogle_1_1Play), the cloud project number is configured in the [Play](https://developer.android.com/reference/unity/namespace/Google/Play#namespaceGoogle_1_1Play) Console and need not be set on the request.

Cloud project number can be found in Project info in your [Google](https://developer.android.com/reference/unity/namespace/Google#namespaceGoogle) Cloud Console for the cloud project where [Play](https://developer.android.com/reference/unity/namespace/Google/Play#namespaceGoogle_1_1Play)[Integrity](https://developer.android.com/reference/unity/namespace/Google/Play/Integrity#namespaceGoogle_1_1Play_1_1Integrity) API is enabled.

Calls to [decrypt the token on Google's server](https://developer.android.com/google/play/integrity/verdict#decrypt-verify-google-servers) must be authenticated using the cloud account that was linked to the token in this request.

### Nonce

```c#
string Nonce
```
A nonce to bind the integrity token to.

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

See <https://developer.android.com/google/play/integrity/verdict#nonce> for details about the nonce requirements and recommendations.

## Public functions

### IntegrityTokenRequest

```c#
 IntegrityTokenRequest(
  string nonce,
  long? cloudProjectNumber
)
```
Constructor.

<br />

Details Parameters `nonce` The nonce encoded as a Base64 web-safe no-wrap string. `cloudProjectNumber` An optional cloud project number to link to the integrity token.