<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@digitalpersona/core](./core.md) &gt; [Credential](./core.credential.md) &gt; [(constructor)](./core.credential.(constructor).md)

## Credential.(constructor)

Constructs a credential.

<b>Signature:</b>

```typescript
constructor(id: CredentialId, data?: string | object | null, encode?: boolean);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  id | <code>CredentialId</code> |  |
|  data | <code>string &#124; object &#124; null</code> |  |
|  encode | <code>boolean</code> |  |

