Discourse is a powerful platform for building online communities. With the Discourse API, you can extend Discourse's functionality to build all sorts of custom applications and integrations.
Here are some examples of what you can build with the Discourse API:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discourse: {
type: "app",
app: "discourse",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.discourse.$auth.domain}/admin/users/list/active.json`,
headers: {
"Api-Username": `${this.discourse.$auth.api_username}`,
"Api-Key": `${this.discourse.$auth.api_key}`,
},
})
},
})
Discourse uses API keys for authentication. When you connect your Discourse account, Pipedream securely stores the keys so you can easily authenticate to Discourse APIs in both code and no-code steps.
For domain, enter the hostname, without the protocol, that you'd use in this API call: https://[domain]/admin/users/list/active.json
. For example: example.com
.
If you host Discourse on a subfolder (for example: https://pipedream.com/community), enter the subfolder as a part of the domain (pipedream.com/community
).
Create an API key in your Admin panel, and enter the associated api_username and api_key.