# הפקת מפתח API ב-Theme Creator נכשלה

**URL:** https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247
**Category:** Bug
**Tags:** theme-creator
**Created:** [13 בדצמבר,‏ 2024,‏ 8:38am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247 "2024-12-13T08:38:29Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![小卡帕](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/%E5%B0%8F%E5%8D%A1%E5%B8%95/32/472626_2.png) [@小卡帕](https://meta.discourse.org/u/%E5%B0%8F%E5%8D%A1%E5%B8%95)
#### Post date: [13 בדצמבר,‏ 2024,‏ 8:38am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/1 "2024-12-13T08:38:29Z")

</div>

hi, I have been unable to generate the API key.

 ![A screenshot of a theme creator interface with a pop-up dialog showing instructions on how to generate an API key for a theme using a console application. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/8/c/9/8c92b7d23341e217c84f437e6f8c7305ed9f9f34.jpeg)  
 ![The image shows a modal window with a "500 error" message, prompting the user to click "OK" to dismiss the error. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/0/6/3/063a39203b0d7e5c98309677794679d0e8b54ba1.jpeg)

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [13 בדצמבר,‏ 2024,‏ 9:50am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/2 "2024-12-13T09:50:44Z")

</div>

A 500 error usually means something’s wrong on the server side, like a misconfiguration, lack of resources, or just a temporary glitch. If you run into this, try giving it another, sometimes it’s just a quick hiccup. If that doesn’t work, check the server logs by running `./launcher logs app` to see if there’s any more info on what’s going wrong. If that still doesn’t help, restarting the app with `./launcher restart app` can often fix the issue and get things back on track.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [13 בדצמבר,‏ 2024,‏ 10:21am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/3 "2024-12-13T10:21:53Z")

</div>

> [@MihirR](#):
>
> check the server logs by running `./launcher logs app` to see if there’s any more info on what’s going wrong.

As a user, you cannot check logs or restart the app. So at [discourse.theme-creator.io](http://discourse.theme-creator.io), you need to be a member of the Discourse team to check the logs.

The theme creator allows users to perform actions that are usually restricted to admins, such as installing themes and creating API keys. Those customizations sometimes break

* * *

I can reproduce the error; I am also unable to generate a key.

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [13 בדצמבר,‏ 2024,‏ 10:46am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/5 "2024-12-13T10:46:31Z")

</div>

Thanks for clearing that up! Since I can’t check the logs or restart the app, I get that it might be a problem with the customizations from the theme creator. Since you can reproduce the error too, do you know if there’s a quick fix or if we need to escalate this to the Discourse team?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [13 בדצמבר,‏ 2024,‏ 10:47am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/6 "2024-12-13T10:47:07Z")

</div>

thanks for the report. someone will look at this.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [13 בדצמבר,‏ 2024,‏ 10:49am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/7 "2024-12-13T10:49:10Z")

</div>

@angus @pmusaraj this seems related to the changes in [this PR](https://github.com/discourse/discourse/pull/28119) ([meta topic](https://meta.discourse.org/t/feasibility-of-allowing-a-user-api-key-client-to-register-a-valid-auth-redirect/312901/8)).

Do either of you know off-hand how we can update this kind of usage:

> <https://github.com/discourse/discourse-theme-creator/blob/b424fdece478f6026a2ecd2361384d1a85580943/app/controllers/theme_creator/theme_creator_controller.rb#L28C8-L41C5>

(if not, we’ll get someone assigned to dig into it next week)

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [13 בדצמבר,‏ 2024,‏ 1:40pm UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/9 "2024-12-13T13:40:09Z")

</div>

I’ve made a PR which updates the theme-creator plugin to use the new system:

[https://github.com/discourse/discourse-theme-creator/pull/100](https://github.com/discourse/discourse-theme-creator/pull/100)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [13 בדצמבר,‏ 2024,‏ 3:55pm UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/10 "2024-12-13T15:55:28Z")

</div>

Thanks @angus! Fix is merged and deployed

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [14 בדצמבר,‏ 2024,‏ 8:00am UTC](https://meta.discourse.org/t/generate-api-key-in-theme-creator-failed/342247/14 "2024-12-14T08:00:06Z")

</div>

This topic was automatically closed after 16 hours. New replies are no longer allowed.
