# CreatePublicKeyCredentialResponse

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

*** ** * ** ***

<br />

```
class CreatePublicKeyCredentialResponse : 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.CreatePublicKeyCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/CreatePublicKeyCredentialResponse) |

*** ** * ** ***

A response of a public key credential (passkey) flow.

## Summary

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

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/CreatePublicKeyCredentialResponse#registrationResponseJson()` the public key credential registration response in JSON format |

### 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()`)

## Public constructors

### CreatePublicKeyCredentialResponse

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

```
CreatePublicKeyCredentialResponse(registrationResponseJson: String)
```

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

| Parameters |
|---|---|
| `registrationResponseJson: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the public key credential registration response in JSON format |

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

## Public properties

### registrationResponseJson

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

```
val registrationResponseJson: String
```

the public key credential registration response in JSON format