# BeginGetCustomCredentialOption

# BeginGetCustomCredentialOption

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

<br />

```
open class BeginGetCustomCredentialOption : BeginGetCredentialOption
```

<br />

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

*** ** * ** ***

Allows extending custom versions of BeginGetCredentialOptions for unique use cases.

If you get a[BeginGetCustomCredentialOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCustomCredentialOption)instead of a type-safe option class such as[BeginGetPasswordOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPasswordOption),[BeginGetPublicKeyCredentialOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPublicKeyCredentialOption), etc., then you should check if you have any other library at interest that supports this custom[type](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCustomCredentialOption#type())of credential option, and if so use its parsing utilities to resolve to a type-safe class within that library.  

|                                                             Throws                                                             |
|--------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.IllegalArgumentException](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html) | If[type](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCustomCredentialOption#type())is null or, empty |

## Summary

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

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ### Inherited properties                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.credentials.provider.BeginGetCredentialOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption) |-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Bundle](https://developer.android.com/reference/android/os/Bundle.html)          | [candidateQueryData](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption#candidateQueryData()) the parameters needed to retrieve the credentials, in the form of the raw[Bundle](https://developer.android.com/reference/android/os/Bundle.html)- can typically be ignored by the credential provider as the required properties are already parse into the structured subclasses                                                                    | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [id](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption#id()) unique id representing this particular option, to be used while constructing the[CredentialEntry](https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry)to be set on[BeginGetCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialResponse)                                      | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [type](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption#type()) the type of the credential to be retrieved against this option, e.g. a[BeginGetPasswordOption](https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPasswordOption)will have type[PasswordCredential.TYPE_PASSWORD_CREDENTIAL](https://developer.android.com/reference/kotlin/androidx/credentials/PasswordCredential#TYPE_PASSWORD_CREDENTIAL()) | |

## Public constructors

### BeginGetCustomCredentialOption

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

```
BeginGetCustomCredentialOption(
    id: String,
    type: String,
    candidateQueryData: Bundle
)
```