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

*** ** * ** ***


```
public class BeginCreateCustomCredentialRequest extends BeginCreateCredentialRequest
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.credentials.provider.BeginCreateCredentialRequest](https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest) ||
|   | ↳ | [androidx.credentials.provider.BeginCreateCustomCredentialRequest](https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCustomCredentialRequest) |

*** ** * ** ***

Base custom begin create request class for registering a credential.

If you get a `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCustomCredentialRequest` instead of a type-safe request class such as `https://developer.android.com/reference/androidx/credentials/provider/BeginCreatePasswordCredentialRequest`, `https://developer.android.com/reference/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/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/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/androidx/credentials/provider/BeginCreateCustomCredentialRequest#(kotlin.String,android.os.Bundle,androidx.credentials.provider.CallingAppInfo)`, or `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCustomCredentialRequest#(kotlin.String,android.os.Bundle,androidx.credentials.provider.CallingAppInfo)` is null |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCustomCredentialRequest#BeginCreateCustomCredentialRequest(kotlin.String,android.os.Bundle,androidx.credentials.provider.CallingAppInfo)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html type, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html candidateQueryData, https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo )` constructs an instance of `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCustomCredentialRequest` |

| ### Inherited methods |
|---|
| From [androidx.credentials.provider.BeginCreateCredentialRequest](https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest) |---|---| | `final https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#getCallingAppInfo()()` | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#getCandidateQueryData()()` | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#getType()()` | |

## Public constructors

### BeginCreateCustomCredentialRequest

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

```
public BeginCreateCustomCredentialRequest(
    @NonNull String type,
    @NonNull Bundle candidateQueryData,
    CallingAppInfo callingAppInfo
)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html type` | the credential type determined by the credential-type-specific subclass for custom use cases |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html candidateQueryData` | 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) |
| `https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo` | info pertaining to the app that is requesting for credentials retrieval or creation |