# RegisterCreationOptionsRequest

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/RegisterCreationOptionsRequest.kt+class:androidx.credentials.registry.provider.RegisterCreationOptionsRequest) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

*** ** * ** ***

<br />

```
public abstract class RegisterCreationOptionsRequest
```

<br />

*** ** * ** ***

A request to register creation options with Credential Manager.

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCreationOptionsRequest#RegisterCreationOptionsRequest(kotlin.String,kotlin.String,kotlin.ByteArray,kotlin.ByteArray,kotlin.String)( @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/java/lang/String.html id, @https://developer.android.com/reference/androidx/annotation/NonNull byte[] creationOptions, @https://developer.android.com/reference/androidx/annotation/NonNull byte[] matcher, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html intentAction )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull byte[]` | `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCreationOptionsRequest#getCreationOptions()()` the data to be stored in the registry, later to be passed to the `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCreationOptionsRequest#matcher()`. |
| `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/registry/provider/RegisterCreationOptionsRequest#getId()()` the unique id that identifies this registry, such that it won't be overwritten by other different registries of the same `type` |
| `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/registry/provider/RegisterCreationOptionsRequest#getIntentAction()()` the intent action that will be used to launch your fulfillment activity when your app was chosen by the user to create the given credential, default to `https://developer.android.com/reference/androidx/credentials/registry/provider/RegistryManager#ACTION_CREATE_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 |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull byte[]` | `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCreationOptionsRequest#getMatcher()()` 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 entries given the `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCreationOptionsRequest#creationOptions()` and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your application will never be surfaced to the user during creation |
| `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/registry/provider/RegisterCreationOptionsRequest#getType()()` the type of the credentials to be created being registered |

## Public constructors

### RegisterCreationOptionsRequest

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

```
public RegisterCreationOptionsRequest(
    @NonNull String type,
    @NonNull String id,
    @NonNull byte[] creationOptions,
    @NonNull byte[] matcher,
    @NonNull String intentAction
)
```

## Public methods

### getCreationOptions

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

```
public final @NonNull byte[] getCreationOptions()
```

the data to be stored in the registry, later to be passed to the `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCreationOptionsRequest#matcher()`.

### getId

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

```
public final @NonNull String getId()
```

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

### getIntentAction

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

```
public final @NonNull String getIntentAction()
```

the intent action that will be used to launch your fulfillment activity when your app was chosen by the user to create the given credential, default to `https://developer.android.com/reference/androidx/credentials/registry/provider/RegistryManager#ACTION_CREATE_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

### getMatcher

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

```
public final @NonNull byte[] getMatcher()
```

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 entries given the `https://developer.android.com/reference/androidx/credentials/registry/provider/RegisterCreationOptionsRequest#creationOptions()` and the request; an invalid matcher (e.g. one that fails wasm interpretation or causes exceptions) will mean that your application will never be surfaced to the user during creation

### getType

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

```
public final @NonNull String getType()
```

the type of the credentials to be created being registered