# RegisterCredentialsRequest

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

*** ** * ** ***

<br />

```
abstract class RegisterCredentialsRequest
```

<br />

Known direct subclasses [DigitalCredentialRegistry](https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialRegistry)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialRegistry` | A request to register digital credentials with Credential Manager. |

Known indirect subclasses [OpenId4VpRegistry](https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/digitalcredentials/openid4vp/OpenId4VpRegistry` | A registration request containing data that can serve the [OpenID for Verifiable Presentations protocol](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html) based request. |

*** ** * ** ***

A request to register credentials with Credential Manager.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#id()` or `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#intentAction()` length is greater than 64 characters |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#RegisterCredentialsRequest(kotlin.String,kotlin.String,kotlin.ByteArray,kotlin.ByteArray,kotlin.String)( type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, credentials: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html, matcher: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html, intentAction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#credentials()` the credentials to register |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#id()` the unique id that identifies this registry, such that it won't be overwritten by other different registries of the same `type` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#intentAction()` the intent action that will be used to launch your fulfillment activity when one of your credentials was chosen by the user, default to `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()` when unspecified; when Credential Manager launches your fulfillment activity, it will build an intent with the given `intentAction` targeting your package, so this is useful when you need to define different fulfillment activities for different registries |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#matcher()` the matcher wasm binary in bytes; the matcher will be interpreted and run in a safe and privacy-preserving sandbox upon an incoming request and it should output the qualified credentials given the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#credentials()` and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your credentials will never be surfaced to the user |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#type()` the type of the credentials being registered; this matches the `https://developer.android.com/reference/kotlin/androidx/credentials/Credential#type()` that these registered credentials will be returned as |

## Public constructors

### RegisterCredentialsRequest

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
RegisterCredentialsRequest(
    type: String,
    id: String,
    credentials: ByteArray,
    matcher: ByteArray,
    intentAction: String = RegistryManager.ACTION_GET_CREDENTIAL
)
```

## Public properties

### credentials

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val credentials: ByteArray
```

the credentials to register

### id

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val id: String
```

the unique id that identifies this registry, such that it won't be overwritten by other different registries of the same `type`

### intentAction

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val intentAction: String
```

the intent action that will be used to launch your fulfillment activity when one of your credentials was chosen by the user, default to `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()` when unspecified; when Credential Manager launches your fulfillment activity, it will build an intent with the given `intentAction` targeting your package, so this is useful when you need to define different fulfillment activities for different registries

### matcher

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val matcher: ByteArray
```

the matcher wasm binary in bytes; the matcher will be interpreted and run in a safe and privacy-preserving sandbox upon an incoming request and it should output the qualified credentials given the `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#credentials()` and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your credentials will never be surfaced to the user

### type

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val type: String
```

the type of the credentials being registered; this matches the `https://developer.android.com/reference/kotlin/androidx/credentials/Credential#type()` that these registered credentials will be returned as