# Gem для API Discourse — как создать тему с тегами?

**URL:** <https://meta.discourse.org/t/discourse-api-gem-how-to-create-topic-with-tags/156869>\
**Category:** Product Support\
**Created:** [06.Июль.2020 03:31:54 UTC](https://meta.discourse.org/t/discourse-api-gem-how-to-create-topic-with-tags/156869 "2020-07-06T03:31:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [06.Июль.2020 03:31:54 UTC](https://meta.discourse.org/t/discourse-api-gem-how-to-create-topic-with-tags/156869/1 "2020-07-06T03:31:54Z")

</div>

Это не работает…

```plaintext
client.create_topic(
  title: "My Title",
  category: "13",
  raw: "My Post",
  tags: "testtag"
)

```

Так как требуется как минимум один тег, я получаю:

```plaintext
DiscourseApi::UnprocessableEntity ({"action"=>"create_post", "errors"=>["You must select at least 1 tag."]}):

```

Есть ли идеи, как создавать темы с тегами через gem для Discourse?

---

_[View the full topic](https://meta.discourse.org/t/discourse-api-gem-how-to-create-topic-with-tags/156869)._
