# Development

**URL:** https://meta.discourse.org/c/dev/7.md?page=82

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

**Page:** 83

---

## [422 error when posting new topic via API](https://meta.discourse.org/t/422-error-when-posting-new-topic-via-api/173644)

<div class="topic-metadata">

**Author:** [@John\_Streeter](https://meta.discourse.org/u/John_Streeter)\
**Replies:** 1\
**Last updated:** [December 17, 2020, 11:23pm UTC](https://meta.discourse.org/t/422-error-when-posting-new-topic-via-api/173644 "2020-12-17T23:23:48Z")

</div>

Hi all, I’m trying to post a new topic via the API but keep getting the 422 error with the below message whenever I try to use plain text (rather than a form): "\*\*action\*\*": "create\_post", "\*\*errors\*\*\*":…

---

## [How best to queue a long-running job](https://meta.discourse.org/t/how-best-to-queue-a-long-running-job/173533)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 6\
**Last updated:** [December 16, 2020, 11:06pm UTC](https://meta.discourse.org/t/how-best-to-queue-a-long-running-job/173533 "2020-12-16T23:06:48Z")

</div>

So I’ve got a plugin that kicks off Ansible to do a Discourse installation (I really, really, want to stop using WordPress to take installation orders!). Initially, I was calling fork to kick it off, which worked fine i…

---

## [Theme component to add a new search source](https://meta.discourse.org/t/theme-component-to-add-a-new-search-source/173484)

<div class="topic-metadata">

**Author:** [@chrispanag](https://meta.discourse.org/u/chrispanag)\
**Replies:** 2\
**Last updated:** [December 16, 2020, 2:23pm UTC](https://meta.discourse.org/t/theme-component-to-add-a-new-search-source/173484 "2020-12-16T14:23:40Z")

</div>

I’m thinking of developing a theme component to integrate a search engine from another site with my Discourse instance. This search engine has an API that can be queried with the necessary parameters. The idea is to mod…

---

## [Conflict with Quantcast RGPD solution "choice" and ember.js](https://meta.discourse.org/t/conflict-with-quantcast-rgpd-solution-choice-and-ember-js/170896)

<div class="topic-metadata">

**Author:** [@OsaAjani](https://meta.discourse.org/u/OsaAjani)\
**Replies:** 12\
**Last updated:** [December 15, 2020, 5:52pm UTC](https://meta.discourse.org/t/conflict-with-quantcast-rgpd-solution-choice-and-ember-js/170896 "2020-12-15T17:52:41Z")

</div>

Hello, so this is quite a specific bug, but his impact may go far beyond this specific case, and so i’ve got a question about it. (Also, i apologize for my english, i’m french, so not a native speaker at all…) But fir…

---

## [Trouble adding vault-rails gem to a plugin](https://meta.discourse.org/t/trouble-adding-vault-rails-gem-to-a-plugin/173291)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 4\
**Last updated:** [December 14, 2020, 9:26pm UTC](https://meta.discourse.org/t/trouble-adding-vault-rails-gem-to-a-plugin/173291 "2020-12-14T21:26:16Z")

</div>

I’m trying to add vault-rails to a plugin to encrypt keys that are part of a model I have added, following an example here: Plugin with custom gems - #4 by Falco (Is there some way to do that already in Discourse that I…

---

## [CSS label for timeline scroller?](https://meta.discourse.org/t/css-label-for-timeline-scroller/172658)

<div class="topic-metadata">

**Author:** [@Ryan\_N](https://meta.discourse.org/u/Ryan_N)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 10:59pm UTC](https://meta.discourse.org/t/css-label-for-timeline-scroller/172658 "2020-12-09T22:59:48Z")

</div>

On Desktop, I’m trying to change the color of the timeline scroller and the vertical line it rides along. Anyone know what these CSS labels are? I tried .timeline-container and .topic-timeline without success and can’t…

---

## [User input validation](https://meta.discourse.org/t/user-input-validation/172741)

<div class="topic-metadata">

**Author:** [@Cal](https://meta.discourse.org/u/Cal)\
**Replies:** 9\
**Last updated:** [December 9, 2020, 3:25pm UTC](https://meta.discourse.org/t/user-input-validation/172741 "2020-12-09T15:25:10Z")

</div>

Does anyone know if it’s possible to implement custom user input validation, specifically for new users, new admin badges and new user fields. After a penetration test we found we are vulnerable to HTML Injection and ot…

---

## [How to upload images via API with Node.js?](https://meta.discourse.org/t/how-to-upload-images-via-api-with-node-js/172605)

<div class="topic-metadata">

**Author:** [@jwulf](https://meta.discourse.org/u/jwulf)\
**Replies:** 1\
**Last updated:** [December 8, 2020, 11:59am UTC](https://meta.discourse.org/t/how-to-upload-images-via-api-with-node-js/172605 "2020-12-08T11:59:59Z")

</div>

This has been asked various times, but none of the solutions so far work for me. I’m using Node.js to upload images for a post via the API. I can create posts no problem, but images will not upload. I convert the imag…

---

## [GET directory\_items doesn't work with api-key provided](https://meta.discourse.org/t/get-directory-items-doesnt-work-with-api-key-provided/172107)

<div class="topic-metadata">

**Author:** [@Mike\_Yermolayev](https://meta.discourse.org/u/Mike_Yermolayev)\
**Replies:** 2\
**Last updated:** [December 7, 2020, 1:43pm UTC](https://meta.discourse.org/t/get-directory-items-doesnt-work-with-api-key-provided/172107 "2020-12-07T13:43:16Z")

</div>

Hello, I was trying to get all users using /directory\_items endpoint but what I figured out is that I can’t get it when I provide api-key with ‘read’ permissions. The strangest thing is that I can get it without any ap…

---

## [Fetching onebox images locally](https://meta.discourse.org/t/fetching-onebox-images-locally/172344)

<div class="topic-metadata">

**Author:** [@chrispanag](https://meta.discourse.org/u/chrispanag)\
**Replies:** 3\
**Last updated:** [December 5, 2020, 9:39pm UTC](https://meta.discourse.org/t/fetching-onebox-images-locally/172344 "2020-12-05T21:39:25Z")

</div>

Hello all, I created a plugin that extends the onebox functionality for a website that lots of users of my forum use. This onebox also displays an image from the aforementioned website. Is there a way to store the imag…

---

## [Unlist "About the \*\*\*\*\*" topics automatically when it gets created](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980)

<div class="topic-metadata">

**Author:** [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Replies:** 6\
**Last updated:** [December 4, 2020, 12:00pm UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980 "2020-12-04T12:00:44Z")

</div>

I create topics and categories through API. When I create a category, “about the \*\*\*” topic is created automatically but I want to “unlist” it so user should not be able to see it. any suggestions on how I can do this ?? …

---

## [Unexpected editing delay when changing topic title on a local install?](https://meta.discourse.org/t/unexpected-editing-delay-when-changing-topic-title-on-a-local-install/171974)

<div class="topic-metadata">

**Author:** [@jieiku](https://meta.discourse.org/u/jieiku)\
**Replies:** 1\
**Last updated:** [December 4, 2020, 9:21am UTC](https://meta.discourse.org/t/unexpected-editing-delay-when-changing-topic-title-on-a-local-install/171974 "2020-12-04T09:21:30Z")

</div>

I recently got Discourse installed and I have absolutely loved using it! One thing I noticed is that when you change the title of a Topic there is a delay, the delay is long enough that it appears like it broke when you…

---

## [Someone May Have Hacked My Website, What Do I Do?](https://meta.discourse.org/t/someone-may-have-hacked-my-website-what-do-i-do/172051)

<div class="topic-metadata">

**Author:** [@CaptainZac](https://meta.discourse.org/u/CaptainZac)\
**Replies:** 1\
**Last updated:** [December 3, 2020, 1:14am UTC](https://meta.discourse.org/t/someone-may-have-hacked-my-website-what-do-i-do/172051 "2020-12-03T01:14:10Z")

</div>

So a few weeks ago we had someone who came onto our forum and completely tried to destroy it by vandalism. Luckily, TL0 users must have posts approved, so none of them got through… Fast forward to now, and I get a mentio…

---

## [How to programmatically generate user api key](https://meta.discourse.org/t/how-to-programmatically-generate-user-api-key/151738)

<div class="topic-metadata">

**Author:** [@X\_Code](https://meta.discourse.org/u/X_Code)\
**Replies:** 2\
**Last updated:** [December 2, 2020, 9:11pm UTC](https://meta.discourse.org/t/how-to-programmatically-generate-user-api-key/151738 "2020-12-02T21:11:12Z")

</div>

I want to generate API KEY for single user programmatically and I tried something like the following curl -X POST '\<root url\>/admin/api/keys' --data 'key%5Bdescription%5D=XXX&key%5Busername%5D=XXX' and many other thin…

---

## [Adding an authorization header for a webhook?](https://meta.discourse.org/t/adding-an-authorization-header-for-a-webhook/141013)

<div class="topic-metadata">

**Author:** [@davidnewkerk](https://meta.discourse.org/u/davidnewkerk)\
**Replies:** 3\
**Last updated:** [December 1, 2020, 10:20am UTC](https://meta.discourse.org/t/adding-an-authorization-header-for-a-webhook/141013 "2020-12-01T10:20:18Z")

</div>

I’m working on integrating a Mailchimp newsletter subscription option into new user registrations, and have made progress using this plugin from @pfaffman GitHub - pfaffman/discourse-mailchimp-webhook · GitHub The plugi…

---

## [Multisite rake uploads task](https://meta.discourse.org/t/multisite-rake-uploads-task/171716)

<div class="topic-metadata">

**Author:** [@RGJ](https://meta.discourse.org/u/RGJ)\
**Replies:** 1\
**Last updated:** [November 30, 2020, 10:50pm UTC](https://meta.discourse.org/t/multisite-rake-uploads-task/171716 "2020-11-30T22:50:21Z")

</div>

Some uploads rake tasks have this pattern: RailsMultisite::ConnectionManagement.each\_connection do |db| unless Discourse.store.external? puts "This task only works for external storage." exit 1 end…

---

## [How to show HTML view and how to update data in HTML view](https://meta.discourse.org/t/how-to-show-html-view-and-how-to-update-data-in-html-view/171474)

<div class="topic-metadata">

**Author:** [@Deepak\_Kumar4](https://meta.discourse.org/u/Deepak_Kumar4)\
**Replies:** 1\
**Last updated:** [November 30, 2020, 5:07pm UTC](https://meta.discourse.org/t/how-to-show-html-view-and-how-to-update-data-in-html-view/171474 "2020-11-30T17:07:22Z")

</div>

can you explain to me how it’s working in ‘raw-plugin-outlet’?

---

## [Uploading image for Discourse badge](https://meta.discourse.org/t/uploading-image-for-discourse-badge/170715)

<div class="topic-metadata">

**Author:** [@dariKG](https://meta.discourse.org/u/dariKG)\
**Replies:** 1\
**Last updated:** [November 30, 2020, 4:38pm UTC](https://meta.discourse.org/t/uploading-image-for-discourse-badge/170715 "2020-11-30T16:38:59Z")

</div>

Hi, we have designed our own badges for our Discourse-based discussion board, but giving the Google drive link to the .png link to the image isn’t doing the trick - the image won’t show. It is not working with a Github…

---

## [Invalid Access using Global Key on All users](https://meta.discourse.org/t/invalid-access-using-global-key-on-all-users/171645)

<div class="topic-metadata">

**Author:** [@JustinBack](https://meta.discourse.org/u/JustinBack)\
**Replies:** 2\
**Last updated:** [November 29, 2020, 6:52pm UTC](https://meta.discourse.org/t/invalid-access-using-global-key-on-all-users/171645 "2020-11-29T18:52:57Z")

</div>

Just noticed this issue today. Generating an api key for all users with global scopes, then updating a topic will result in an invalid\_access curl --location --request PUT 'https://example.com/t/-/365.json' \\ --header …

---

## [Topic Status API is not working](https://meta.discourse.org/t/topic-status-api-is-not-working/170732)

<div class="topic-metadata">

**Author:** [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Replies:** 1\
**Last updated:** [November 27, 2020, 9:44am UTC](https://meta.discourse.org/t/topic-status-api-is-not-working/170732 "2020-11-27T09:44:54Z")

</div>

I have tried this api Discourse API Docs but it’s not working. {"success"=\>"OK", "topic\_status\_update"=\>nil} I got this in the API response.

---

## [Logical security over Current User actions](https://meta.discourse.org/t/logical-security-over-current-user-actions/171089)

<div class="topic-metadata">

**Author:** [@feabila](https://meta.discourse.org/u/feabila)\
**Replies:** 8\
**Last updated:** [November 25, 2020, 11:28pm UTC](https://meta.discourse.org/t/logical-security-over-current-user-actions/171089 "2020-11-25T23:28:53Z")

</div>

Yoo! How are you !? I have been doing some work around logical security based on current user information, like ´if this topic.creator.username to be equals to User.current().username´ I allow the user to edit topic or …

---

## [How to add query parameters to Data Explorer?](https://meta.discourse.org/t/how-to-add-query-parameters-to-data-explorer/171260)

<div class="topic-metadata">

**Author:** [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Replies:** 7\
**Last updated:** [November 25, 2020, 3:58pm UTC](https://meta.discourse.org/t/how-to-add-query-parameters-to-data-explorer/171260 "2020-11-25T15:58:35Z")

</div>

I recently suggested it would be great to allow query parameters in reports. That way, I could share a Data Explorer URL with a default parameter already filled in. Something like this: Would anyone be interested i…

---

## [Retrieve only post ids from api](https://meta.discourse.org/t/retrieve-only-post-ids-from-api/171052)

<div class="topic-metadata">

**Author:** [@Vloz](https://meta.discourse.org/u/Vloz)\
**Replies:** 2\
**Last updated:** [November 24, 2020, 9:07am UTC](https://meta.discourse.org/t/retrieve-only-post-ids-from-api/171052 "2020-11-24T09:07:31Z")

</div>

Hello everybody, i am trying to retrieve topic stream attribute containing every post ids, it’s pretty easy using /t/{id}.json but it also send back topic basic data (like firsts posts, participants, etc…). That’s not …

---

## [Create an empty topic via API](https://meta.discourse.org/t/create-an-empty-topic-via-api/170937)

<div class="topic-metadata">

**Author:** [@ben\_ftima\_wajdi](https://meta.discourse.org/u/ben_ftima_wajdi)\
**Replies:** 4\
**Last updated:** [November 22, 2020, 6:34pm UTC](https://meta.discourse.org/t/create-an-empty-topic-via-api/170937 "2020-11-22T18:34:34Z")

</div>

Is it possible to create an empty topic (without any posts)? I think this not allowed bc in API description the raw field is required

---

## [Discourse Plugins and Rails 6 config/initializers Question](https://meta.discourse.org/t/discourse-plugins-and-rails-6-config-initializers-question/168373)

<div class="topic-metadata">

**Author:** [@neounix](https://meta.discourse.org/u/neounix)\
**Replies:** 22\
**Last updated:** [November 22, 2020, 2:47pm UTC](https://meta.discourse.org/t/discourse-plugins-and-rails-6-config-initializers-question/168373 "2020-11-22T14:47:09Z")

</div>

Hey Discourse Plugin Gurus, Just a quick question about Discourse plugins and Rails initializers. If a Discourse plugin has a directory called “config” and a subdirectory under “config” called “initializers” does the D…

---

## [Alter topic creation date](https://meta.discourse.org/t/alter-topic-creation-date/168256)

<div class="topic-metadata">

**Author:** [@dariKG](https://meta.discourse.org/u/dariKG)\
**Replies:** 4\
**Last updated:** [November 21, 2020, 9:17am UTC](https://meta.discourse.org/t/alter-topic-creation-date/168256 "2020-11-21T09:17:29Z")

</div>

Hi everyone, I am writing because I am trying to populate my forum with posts made by a set of users on another old forum. What I would like to do is to create these threads - and the subsequent posts they may have - k…

---

## [Can Discourse API link with Obsidian?](https://meta.discourse.org/t/can-discourse-api-link-with-obsidian/168447)

<div class="topic-metadata">

**Author:** [@technoshaman](https://meta.discourse.org/u/technoshaman)\
**Replies:** 11\
**Last updated:** [November 20, 2020, 10:44am UTC](https://meta.discourse.org/t/can-discourse-api-link-with-obsidian/168447 "2020-11-20T10:44:10Z")

</div>

Obsidian, the powerful hypertext platform is using markdown files but it’s single-user and doesn’t support collaboration. Would it be possible to link my Obsidian-based, personal digital garden with Discourse (thus crea…

---

## [Timed Topic Field Explanations on the API](https://meta.discourse.org/t/timed-topic-field-explanations-on-the-api/170551)

<div class="topic-metadata">

**Author:** [@mbaker341997](https://meta.discourse.org/u/mbaker341997)\
**Replies:** 2\
**Last updated:** [November 19, 2020, 4:54pm UTC](https://meta.discourse.org/t/timed-topic-field-explanations-on-the-api/170551 "2020-11-19T16:54:28Z")

</div>

For my project I would like to programmatically create scheduled topics. I was thinking of using the timed topic api endpoint, but I’m a little confused about some of the fields. id path parameter - straightforward, to…

---

## [Plugin to display various information in blocks above topics list](https://meta.discourse.org/t/plugin-to-display-various-information-in-blocks-above-topics-list/170591)

<div class="topic-metadata">

**Author:** [@YuriyS](https://meta.discourse.org/u/YuriyS)\
**Replies:** 0\
**Last updated:** [November 19, 2020, 10:41am UTC](https://meta.discourse.org/t/plugin-to-display-various-information-in-blocks-above-topics-list/170591 "2020-11-19T10:41:32Z")

</div>

Hello there. I’m interested if there is any plugin which allows to display various information about events happening on Discourse in blocks above Topic lists. For example, I want each user to see information like “Top …

---

## [How can I update users via API using the user id (not username)?](https://meta.discourse.org/t/how-can-i-update-users-via-api-using-the-user-id-not-username/170203)

<div class="topic-metadata">

**Author:** [@wilson29thid](https://meta.discourse.org/u/wilson29thid)\
**Replies:** 2\
**Last updated:** [November 18, 2020, 6:41am UTC](https://meta.discourse.org/t/how-can-i-update-users-via-api-using-the-user-id-not-username/170203 "2020-11-18T06:41:55Z")

</div>

I’d like my application to update my users’ linked discourse account: specifically the display name and groups the user is a member of (e.g. when they’re promoted in my application, they’re added to another forum group a…

[Previous page](https://meta.discourse.org/c/dev/7.md?page=81)

[Next page](https://meta.discourse.org/c/dev/7.md?page=83)
