# «BAD CSRF» при создании нового сообщения

**URL:** https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001
**Category:** Support
**Created:** [23.Апрель.2020 14:19:12 UTC](https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001 "2020-04-23T14:19:12Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [23.Апрель.2020 17:49:57 UTC](https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001/2 "2020-04-23T17:49:57Z")

</div>

Измените имена ключей, которые вы используете в заголовке запроса, на `api-key` и `api-username`. Имена полей заголовка не чувствительны к регистру, но подчеркивания нельзя использовать вместо дефисов. Пример правильно оформленного API-запроса см. в примере, приведенном в начале этой темы: [Discourse REST API Documentation](https://meta.discourse.org/t/discourse-api-documentation/22706).

---

_[View the full topic](https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001)._
