# 新規投稿作成時に「BAD CSRF」が発生

**URL:** https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001
**Category:** Support
**Created:** [2020 年 4 月 23 日午後 2:19 UTC](https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001 "2020-04-23T14:19:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rahul\_Goswami](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rahul_goswami/32/139414_2.png) [@Rahul\_Goswami](https://meta.discourse.org/u/Rahul_Goswami)
#### Post date: [2020 年 4 月 23 日午後 2:19 UTC](https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001/1 "2020-04-23T14:19:12Z")

</div>

こんにちは、

新しい投稿を作成しようとしているのですが、「BAD CSRF」というエラーが表示されます。どなたかお手伝いいただけますでしょうか？

 ![Screenshot 2020-04-23 at 7.44.04 PM](https://global.discourse-cdn.com/meta/original/3X/6/2/62291cd8ec2cf61e2b461a8349f8f347c01124cd.png) ![Screenshot 2020-04-23 at 7.43.52 PM](https://global.discourse-cdn.com/meta/original/3X/e/a/eae7436261739b655b02047ee53b4781b0ec1d44.png)

---

<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: [2020 年 4 月 23 日午後 5:49 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 リクエストの例については、このトピックの冒頭に示されている例をご覧ください：[https://meta.discourse.org/t/discourse-api-documentation/22706。](https://meta.discourse.org/t/discourse-api-documentation/22706%E3%80%82)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2020 年 5 月 23 日午後 5:50 UTC](https://meta.discourse.org/t/bad-csrf-while-creating-a-new-post/149001/3 "2020-05-23T17:50:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
