> For the complete documentation index, see [llms.txt](https://docs.keyless.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keyless.io/web-sdk/web-sdk-reference/add-operationid-to-an-authentication.md).

# Add OperationID to an authentication

Web SDK supports the association of an identifier to an authentication operation for the purpose of audibility, orchestration or analytics.\
\
This feature therefore pairs with the [Telemetry API](https://docs.keyless.io/consumer/server-api/telemetry) which integrators can query to retrieve information about a specific authentication event via the WebSDK.

### Appending the OperationID

The operation must be generated by the integrator and set to the Web SDK, here's how:

{% tabs %}
{% tab title="Headless" %}

```javascript
await openKeylessWebSocketConnection(sym, {
  ...,
  operation: {
    id: OPERATION_ID
  }
})
```

{% endtab %}

{% tab title="Web Components" %}

```html
<kl-auth
  ...
  operation-id="OPERATION_ID"
></kl-auth>
```

{% endtab %}
{% endtabs %}

### Retrieving the KeylessID&#x20;

Note if you are planning to call the [Telemetry API](https://docs.keyless.io/consumer/server-api/telemetry) you'll see you need to include the KeylessID (`{userId`}) that Keyless use to identity that specific user. This can be retrieved via a separate call to the [Check Keyless Client Device API](https://authentication-service.eks.core-staging.keyless.technology/redoc#tag/Public/paths/~1v1~1users~1%7Bcustomer%7D~1%7Busername%7D/get). \
\
In order to use this API you will need:

<table><thead><tr><th width="154.68621826171875">Input</th><th>Explanation</th></tr></thead><tbody><tr><td>api_key</td><td>The authorization key provided to you by Keyless.</td></tr><tr><td>customer</td><td>The name associated with the backend tenant provided to you by Keyless. </td></tr><tr><td>username</td><td>The username provided during WebSDK enrollment and required for ongoing authentications. </td></tr></tbody></table>
