## List labels

`client.Labels.List(ctx) (*[]Label, error)`

**get** `/v1/labels`

List the labels the user has created for organizing chats. Filter chats by label via GET /v1/chats/search with labelID.

### Returns

- `type LabelListResponse []Label`

  Labels the user has created, sorted by name.

  - `ID string`

    Unique identifier of the label.

  - `Name string`

    Display name of the label.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/beeper/desktop-api-go"
  "github.com/beeper/desktop-api-go/option"
)

func main() {
  client := beeperdesktopapi.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  labels, err := client.Labels.List(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", labels)
}
```

#### Response

```json
[
  {
    "id": "id",
    "name": "name"
  }
]
```
