# BeginCreatePasswordCredentialRequest

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

*** ** * ** ***


```
public final class BeginCreatePasswordCredentialRequest 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.BeginCreatePasswordCredentialRequest](https://developer.android.com/reference/androidx/credentials/provider/BeginCreatePasswordCredentialRequest) |

*** ** * ** ***

Request to begin saving a password credential, received by the provider with a CredentialProviderBaseService.onBeginCreateCredentialRequest call.

This request will not contain all parameters needed to store the password. Provider must use the initial parameters to determine if the password can be stored, and return a `https://developer.android.com/reference/androidx/credentials/provider/BeginGetCredentialResponse` containing a list of `https://developer.android.com/reference/androidx/credentials/provider/CreateEntry`, denoting the accounts/groups where the password can be stored. When user selects one of the returned `https://developer.android.com/reference/androidx/credentials/provider/CreateEntry`, the corresponding `https://developer.android.com/reference/android/app/PendingIntent.html` set on the `https://developer.android.com/reference/androidx/credentials/provider/CreateEntry` will be fired. The `https://developer.android.com/reference/android/content/Intent.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` will contain the complete `https://developer.android.com/reference/androidx/credentials/CreatePasswordRequest` as part of its extras, to be retrieved by passing the intent to `https://developer.android.com/reference/androidx/credentials/provider/PendingIntentHandler#retrieveProviderCreateCredentialRequest(android.content.Intent)`. This request will contain all required parameters needed to actually store the password.

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

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest` | 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. |

## Summary

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

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

### BeginCreatePasswordCredentialRequest

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

```
public BeginCreatePasswordCredentialRequest(
    CallingAppInfo callingAppInfo,
    @NonNull Bundle candidateQueryData
)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo` | the information associated with the requesting for the credentials |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html candidateQueryData` | the bundle containing raw key-value pairs coming from the app requesting the credentials, mostly to be ignored for a password request, and only to be used if the credential provider knows of some custom attributes being provided by a particular calling app |