Discourse_theme CLI for unsupported Discourse versions


I’m getting Error 403 when trying to run watch for first time.
Console output:
discourse_theme watch .
» Using http://mywebsize.com/ from /Users/davidpesava/.discourse_theme
» Using api key from /Users/davidpesava/.discourse_theme
✘ Error 403 for https://mywebsite.com/about.json

Generated API key is for admin user, I tried --reset multipe times

1 Like

Multiple people are using the CLI on a day-to-day basis, so I think this is unlikely to be a CLI bug. Can you try using the same API key from curl or something similar?

There are some examples on how to do that near the top of https://docs.discourse.org/

Also, can you show a screenshot of the API key configuration in the Discourse admin panel? (make sure to block out the actual key)


thanks for answer.

with curl it is working ok, I get that json
I tried colleagues APi that worked last time but not at this time


How is your discourse instance set up? Did you follow the standard install guide? Is it in a subfolder? Do you have any reverse proxies enabled?

Just trie few things now, is it possible that problem is in versions? I have lates version of theme CLI but on server is little bit older

can I use older version of theme CLI?

1 Like

Ah, that would explain it. The theme CLI was recently migrated to use header-based API authentication. That is supported in all current versions of Discourse, including the stable branch.

If you are using an older version of Discourse, I strongly recommend you upgrade ASAP, so that you’re not missing any critical security/bug fixes.

You can do something like

gem install discourse_theme -v "<0.3.0"

thanks for supprot, it works now


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.