# BeginCreateCustomCredentialRequest

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/provider/BeginCreateCustomCredentialRequest.kt+class:androidx.credentials.provider.BeginCreateCustomCredentialRequest) 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/BeginCreateCustomCredentialRequest "View this page in Java")


```
open class BeginCreateCustomCredentialRequest : BeginCreateCredentialRequest
```

<br />

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

*** ** * ** ***

Base custom begin create request class for registering a credential.

If you get a `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCustomCredentialRequest` instead of a type-safe request class such as `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreatePasswordCredentialRequest`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreatePublicKeyCredentialRequest`, etc., then as a credential provider, you should check if you have any other library of interest that supports this custom `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCustomCredentialRequest#(kotlin.String,android.os.Bundle,androidx.credentials.provider.CallingAppInfo)` of credential request, and if so use its parsing utilities to resolve to a type-safe class within that library.

Note : Credential providers are not expected to utilize the constructor in this class for any production flow. This constructor must only be used for testing purposes.

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

## Summary

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

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

## Public constructors

### BeginCreateCustomCredentialRequest

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

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

constructs an instance of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginCreateCustomCredentialRequest`

| Parameters |
|---|---|
| `type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the credential type determined by the credential-type-specific subclass for custom use cases |
| `candidateQueryData: https://developer.android.com/reference/android/os/Bundle.html` | the partial request data in the `https://developer.android.com/reference/android/os/Bundle.html` format that will be sent to the provider during the initial candidate query stage, which should not contain sensitive user credential information (note: bundle keys in the form of `androidx.credentials.*` are reserved for internal library use) |
| `callingAppInfo: https://developer.android.com/reference/kotlin/androidx/credentials/provider/CallingAppInfo?` | info pertaining to the app that is requesting for credentials retrieval or creation |