# IntegrityTokenResponse

<br />

```
public abstract class IntegrityTokenResponse
```

<br />

*** ** * ** ***

Response for[IntegrityManager#requestIntegrityToken(IntegrityTokenRequest)](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityManager#requestIntegrityToken(com.google.android.play.core.integrity.IntegrityTokenRequest)).

## Summary

|                                                                              ### Public constructors                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IntegrityTokenResponse](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityTokenResponse#IntegrityTokenResponse())`()` |

|                                                                                    ### Public methods                                                                                    |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[Task](https://developers.google.com/android/reference/com/google/android/gms/tasks/Task.html)`<`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`>` | ~~[showDialog](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityTokenResponse#showDialog(android.app.Activity,int))~~`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` activity, int typeCode)` **This method is deprecated.** Use[IntegrityManager#showDialog(IntegrityDialogRequest)](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityManager#showDialog(com.google.android.play.core.integrity.IntegrityDialogRequest))instead. <br /> |
| `abstract `[String](https://developer.android.com/reference/java/lang/String.html)                                                                                                       | [token](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityTokenResponse#token())`()` A token which contains the response for the integrity related enquiries.                                                                                                                                                                                                                                                                                                                                                                            |

## Public constructors

### IntegrityTokenResponse

```
public IntegrityTokenResponse()
```  

## Public methods

### showDialog

```
public abstract Task<Integer> [showDialog](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityTokenResponse#showDialog(android.app.Activity,int))(Activity activity, int typeCode)
```
| **This method is deprecated.**   
|
| Use[IntegrityManager#showDialog(IntegrityDialogRequest)](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityManager#showDialog(com.google.android.play.core.integrity.IntegrityDialogRequest))instead.

Displays a dialog to the user.

This method can only be called once per Integrity API response.  

|   Parameters   |
|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int typeCode` | determines which Integrity Dialog type should be shown. See[IntegrityDialogTypeCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityDialogTypeCode)for the supported types. |

|                                                                                    Returns                                                                                    |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Task](https://developers.google.com/android/reference/com/google/android/gms/tasks/Task.html)`<`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`>` | A[Task](https://developers.google.com/android/reference/com/google/android/gms/tasks/Task.html)that completes with a[IntegrityDialogResponseCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityDialogResponseCode)the showDialog flow succeeded or failed. |

### token

```
public abstract String token()
```

A token which contains the response for the integrity related enquiries.