Wordpress plugin - can't find admin api key

Hi,

I installed the discourse plugin on wordpress its asking me for the admin api key, where do I find it ?

Thanks :slight_smile:

1 curtida

/admin/api

Or generate one from an admin user profile

I have installed the plugin but there’s nothing when I go to the URL, I thought maybe it needs to be done back end but I couldn’t find anything

1 curtida

You go to that URL on your Discourse forum not WordPress.

The discourse url is not yet setup as its asking for api key

To generate an API key go to yourdiscoursesite.com/admin/api. That is where you can generate an api key for the WordPress plugin. There will be a button that says generate key.

as I said the discourse site is not setup, plugin is installed but I can’t see discourse
 It gives me a 404 page not found

The wp-discourse plugin acts as an interface between a WordPress site and a Discourse forum. To get it to work, you need to first set up both a WordPress site and a Discourse forum. You will find the admin api key in the admin section of your forum at ‘yourdiscoursesite.com/admin/api’.

The plugin’s documentation about this is not very clear. I’ll try to add to it later this week.

3 curtidas

Hi Simon (@simon ),

Thanks for the reply, I did add it manually to composer.json is there anything else to do ?

I’m not sure. You need to have a Discourse forum up and running to connect to your WordPress site. If you haven’t done that, you can follow either of these guides to do it:

or:
discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

Once that is done you need to go to the Discourse site at <yourforumdomain>/admin/api and click on the button to generate a new api key. Copy and paste the api key into the Discourse API Key setting on your WordPress site.

5 curtidas

Okay Thanks I will try that 
 Much appreciated !

1 curtida

Olå, retomo a discussão e tenho uma pergunta: tenho um site Discourse e um site WordPress. A diferença entre a chave de API para todos os usuårios e para apenas um usuårio é a seguinte:

Todos os usuĂĄrios: todos os usuĂĄrios podem ver e interagir tanto com o Discourse quanto com o WordPress.

Um Ășnico usuĂĄrio: significa que, quando conectado, apenas esse usuĂĄrio pode interagir com o WordPress e o Discourse.

Estou correto?

Qual é o risco de gerar uma chave de API para todos os usuårios e conceder todas as permissÔes?

Obrigado.

OlĂĄ Yves, a chave da API Ă© usada apenas para configurar a conexĂŁo.

Uma vez estabelecida essa conexĂŁo, qualquer usuĂĄrio do WordPress com permissĂ”es de postagem pode publicar seus posts no Discourse, dependendo das configuraçÔes de “Publicar” que vocĂȘ tiver.

Sugiro que vocĂȘ gere uma chave da API para um usuĂĄrio administrador especĂ­fico e a nomeie como “Wordpress”.

4 curtidas