# DiscourseのAPIキーはどこに配置すれば、投稿を取得できますか？

**URL:** <https://meta.discourse.org/t/where-should-i-put-the-api-keys-of-discourse-so-that-i-can-fetch-the-posts/224177>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [2022 年 4 月 13 日午後 3:08 UTC](https://meta.discourse.org/t/where-should-i-put-the-api-keys-of-discourse-so-that-i-can-fetch-the-posts/224177 "2022-04-13T15:08:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Allen\_Chen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/allen_chen/32/256627_2.png) [@Allen\_Chen](https://meta.discourse.org/u/Allen_Chen)\
**Post date:** [2022 年 4 月 13 日午後 3:08 UTC](https://meta.discourse.org/t/where-should-i-put-the-api-keys-of-discourse-so-that-i-can-fetch-the-posts/224177/1 "2022-04-13T15:08:27Z")

</div>

Discourse の投稿を取得しようとしていますが、API キーをどこに入力すればよいかわかりません。`https://{defaultHost}/posts/{id}.json` にフェッチを試みていますが、API キーを入力していないためエラーが発生します。API キーはどこに入力すればよいですか？

---

_[View the full topic](https://meta.discourse.org/t/where-should-i-put-the-api-keys-of-discourse-so-that-i-can-fetch-the-posts/224177)._
