# 将 Raspberry PI 用作机器人发布 Discourse 更新的最佳实践

**URL:** https://meta.discourse.org/t/best-practise-for-using-a-raspberry-pi-as-bot-for-posting-updates-in-discourse/195107
**Category:** Support
**Created:** [2021年六月26日 16:05 UTC](https://meta.discourse.org/t/best-practise-for-using-a-raspberry-pi-as-bot-for-posting-updates-in-discourse/195107 "2021-06-26T16:05:50Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)
#### Post date: [2021年六月27日 12:35 UTC](https://meta.discourse.org/t/best-practise-for-using-a-raspberry-pi-as-bot-for-posting-updates-in-discourse/195107/5 "2021-06-27T12:35:08Z")

</div>

我从未使用过 Discourse API，因此无法在 API 方面为您提供帮助。但我希望以下链接能帮助您入门。

[https://meta.discourse.org/search?q=discourse%20api](https://meta.discourse.org/search?q=discourse%20api)

> [@Discourse REST API Documentation](https://meta.discourse.org/t/discourse-api-documentation/22706):
>
> Discourse API Please view the Discourse API Documentation site for detailed info: [https://docs.discourse.org](https://docs.discourse.org)information_source Authentication API requests must use HTTP header based authentication. Pass your Api-Key and Api-Username as HTTP headers. Authentication via query parameters or request body is not supported (this was removed in April 2020). Please see the example cURL request below. The only API endpoints that continue to support credentials in query parameters are requests to…

[https://meta.discourse.org/t/how-to-run-data-explorer-queries-with-the-discourse-api/120063/2](https://meta.discourse.org/t/how-to-run-data-explorer-queries-with-the-discourse-api/120063/2)

> [@Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576):
>
> Discourse is backed by a complete JSON api. Anything you can do on the site you can also do using the JSON api. The API is documented at [docs.discourse.org](https://docs.discourse.org). You can also use the [discourse\_api](https://github.com/discourse/discourse_api) Ruby gem as a client library. However, not every endpoint is documented. To determine how to do something with the JSON API here are some steps you can follow. Example: recategorize a topic. Go to a topic and start editing a category: Open Chrome dev tools, switch to the Network tab, select …

---

_[View the full topic](https://meta.discourse.org/t/best-practise-for-using-a-raspberry-pi-as-bot-for-posting-updates-in-discourse/195107)._
