> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getPenInfo

> Get current pen information.

```ts theme={null}
static getPenInfo(): Promise<APIResponse<PenInfo>>;
```

**Returns**

* [`APIResponse<PenInfo>`](/en/api-reference/supernote-plugin/types/api-response):
  `result` is [`PenInfo`](/en/api-reference/supernote-plugin/types/pen-info)

## Example

```ts wrap theme={null}
import { PluginCommAPI } from 'sn-plugin-lib';

export async function exampleGetPenInfo() {
 const res = await PluginCommAPI.getPenInfo();
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getPenInfo call failed');
 }
 return res.result;
}
```
