# BeginCreateCredentialRequest

# BeginCreateCredentialRequest

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest "View this page in Java")

<br />

```
abstract class BeginCreateCredentialRequest
```

<br />

Known direct subclasses  
[BeginCreateCustomCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCustomCredentialRequest),[BeginCreatePasswordCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreatePasswordCredentialRequest),[BeginCreatePublicKeyCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreatePublicKeyCredentialRequest)  

|-------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| [BeginCreateCustomCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCustomCredentialRequest)       | Base custom begin create request class for registering a credential.                                                                              |
| [BeginCreatePasswordCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreatePasswordCredentialRequest)   | Request to begin saving a password credential, received by the provider with a CredentialProviderBaseService.onBeginCreateCredentialRequest call. |
| [BeginCreatePublicKeyCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreatePublicKeyCredentialRequest) | Request to begin registering a public key credential.                                                                                             |

*** ** * ** ***

Abstract request class for beginning a create credential request.

This class is to be extended by structured create credential requests such as[BeginCreatePasswordCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreatePasswordCredentialRequest).

## Summary

|                                                        ### Public companion functions                                                        |
|----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                                     | [asBundle](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#asBundle(androidx.credentials.provider.BeginCreateCredentialRequest))`(request: `[BeginCreateCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest)`)` Helper method to convert the class to a parcelable[Bundle](https://developer.android.com/reference/android/os/Bundle.html), in case the class instance needs to be sent across a process.                                                                                                                                                                                |
| [BeginCreateCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest)`?` | [fromBundle](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#fromBundle(android.os.Bundle))`(bundle: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`)` Helper method to convert a[Bundle](https://developer.android.com/reference/android/os/Bundle.html)retrieved through[asBundle](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#asBundle(androidx.credentials.provider.BeginCreateCredentialRequest)), back to an instance of[BeginCreateCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest). |

|                                                                                                                                                                                                                                                                                     ### Public constructors                                                                                                                                                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [BeginCreateCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#BeginCreateCredentialRequest(kotlin.String,android.os.Bundle,androidx.credentials.provider.CallingAppInfo))`(` ` type: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`,` ` candidateQueryData: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`,` ` callingAppInfo: `[CallingAppInfo](https://developer.android.com/reference/kotlin/androidx/credentials/provider/CallingAppInfo)`?` `)` |

|                                              ### Public properties                                               |
|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| [CallingAppInfo](https://developer.android.com/reference/kotlin/androidx/credentials/provider/CallingAppInfo)`?` | [callingAppInfo](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#callingAppInfo())         |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                         | [candidateQueryData](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#candidateQueryData()) |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                | [type](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#type())                             |

## Public companion functions

### asBundle

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

```
fun asBundle(request: BeginCreateCredentialRequest): Bundle
```

Helper method to convert the class to a parcelable[Bundle](https://developer.android.com/reference/android/os/Bundle.html), in case the class instance needs to be sent across a process. Consumers of this method should use[fromBundle](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#fromBundle(android.os.Bundle))to reconstruct the class instance back from the bundle returned here.  

### fromBundle

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

```
fun fromBundle(bundle: Bundle): BeginCreateCredentialRequest?
```

Helper method to convert a[Bundle](https://developer.android.com/reference/android/os/Bundle.html)retrieved through[asBundle](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest#asBundle(androidx.credentials.provider.BeginCreateCredentialRequest)), back to an instance of[BeginCreateCredentialRequest](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCredentialRequest).  

## Public constructors

### BeginCreateCredentialRequest

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

```
BeginCreateCredentialRequest(
    type: String,
    candidateQueryData: Bundle,
    callingAppInfo: CallingAppInfo?
)
```  

## Public properties

### callingAppInfo

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

```
val callingAppInfo: CallingAppInfo?
```  

### candidateQueryData

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

```
val candidateQueryData: Bundle
```  

### type

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

```
val type: String
```