# CreateRestoreCredentialResponse

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/CreateRestoreCredentialResponse.kt+class:androidx.credentials.CreateRestoreCredentialResponse) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

*** ** * ** ***

<br />

```
class CreateRestoreCredentialResponse : CreateCredentialResponse
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.credentials.CreateCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse) ||
|   | ↳ | [androidx.credentials.CreateRestoreCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/CreateRestoreCredentialResponse) |

*** ** * ** ***

A response of the `https://developer.android.com/reference/kotlin/androidx/credentials/RestoreCredential` flow.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/CreateRestoreCredentialResponse#BUNDLE_KEY_CREATE_RESTORE_CREDENTIAL_RESPONSE()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/CreateRestoreCredentialResponse#CreateRestoreCredentialResponse(kotlin.String)(responseJson: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Constructs a `https://developer.android.com/reference/kotlin/androidx/credentials/CreateRestoreCredentialResponse`. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/CreateRestoreCredentialResponse#responseJson()` the public key credential registration response in [JSON format](https://w3c.github.io/webauthn/#authenticatorattestationresponse). |

### Inherited properties

From [androidx.credentials.CreateCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse) `https://developer.android.com/reference/android/os/Bundle.html` `https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse#data()`

the response data in the `https://developer.android.com/reference/android/os/Bundle.html` format
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse#type()`

the credential type determined by the credential-type-specific subclass (e.g. the type for `https://developer.android.com/reference/kotlin/androidx/credentials/CreatePasswordResponse` is `https://developer.android.com/reference/kotlin/androidx/credentials/PasswordCredential#TYPE_PASSWORD_CREDENTIAL()` and for `https://developer.android.com/reference/kotlin/androidx/credentials/CreatePublicKeyCredentialResponse` is `https://developer.android.com/reference/kotlin/androidx/credentials/PublicKeyCredential#TYPE_PUBLIC_KEY_CREDENTIAL()`)

## Constants

### BUNDLE_KEY_CREATE_RESTORE_CREDENTIAL_RESPONSE

```
const val BUNDLE_KEY_CREATE_RESTORE_CREDENTIAL_RESPONSE: String
```

## Public constructors

### CreateRestoreCredentialResponse

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
CreateRestoreCredentialResponse(responseJson: String)
```

Constructs a `https://developer.android.com/reference/kotlin/androidx/credentials/CreateRestoreCredentialResponse`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/CreateRestoreCredentialResponse#(kotlin.String)` is empty, or an invalid JSON |

## Public properties

### responseJson

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
val responseJson: String
```

the public key credential registration response in [JSON format](https://w3c.github.io/webauthn/#authenticatorattestationresponse).