> For the complete documentation index, see [llms.txt](https://marblejs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://marblejs.gitbook.io/docs/other/api-reference/core/createinjectiontoken.md).

# createContextToken

A lookup token associated with a dependency provider, for use with the Marble.js context system.

### **Importing** <a href="#importing" id="importing"></a>

```typescript
import { createContextToken } from '@marblejs/core';
```

### **Type declaration**

```
createContextToken :: () -> ContextToken
createContextToken :: string -> ContextToken
```

### **Example**

The following example creates and associates injection token with Marble.js WebSocket server.

```typescript
import { createContextToken } from '@marblejs/core';
import { WebSocketServerConnection } from '@marblejs/websockets';

const WebSocketServerToken =
    createContextToken<WebSocketServerConnection>('WebSocketServerToken');
```

{% hint style="info" %}
Always remember add a string name for created lookup token.&#x20;
{% endhint %}
