<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@digitalpersona/enrollment](./enrollment.md) &gt; [TimeOtpEnroll](./enrollment.timeotpenroll.md) &gt; [createKeyUri](./enrollment.timeotpenroll.createkeyuri.md)

## TimeOtpEnroll.createKeyUri() method

Converts a secret key to a Key URI, which will be encode as a QR Code image to scan.

<b>Signature:</b>

```typescript
createKeyUri(key: Uint8Array): Promise<string>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  key | <code>Uint8Array</code> | a secret key to convert to a Key URI string. |

<b>Returns:</b>

`Promise<string>`

- a promise to return a Key URI string

## Remarks

For Push Notifications fo AD users, make sure the user's token has an `ad_guid` claim. You may need to use `ClaimsService.GetClaims()` method to append this claim to an existing token.

