I’m struggling to get wordpress to connect to discourse (my install is here forum.employ.com), here is my error message:
[2023-11-07 19:14:56] connection.INFO: check_connection_status.failed_to_connect {"error":"wpdc_response_error","message":"An invalid response was returned from Discourse","http_code":403,"http_body":"{\"errors\":[\"You are not permitted to view the requested resource. The API username or key is invalid.\"],\"error_type\":\"invalid_access\"}"}
[2023-11-07 19:15:11] connection.INFO: check_connection_status.failed_to_connect {"error":"wpdc_response_error","message":"An invalid response was returned from Discourse","http_code":403,"http_body":"{\"errors\":[\"You are not permitted to view the requested resource. The API username or key is invalid.\"],\"error_type\":\"invalid_access\"}"}
[2023-11-07 19:15:35] connection.INFO: check_connection_status.failed_to_connect {"error":"wpdc_response_error","message":"An invalid response was returned from Discourse","http_code":403,"http_body":"{\"errors\":[\"You are not permitted to view the requested resource. The API username or key is invalid.\"],\"error_type\":\"invalid_access\"}"}
[2023-11-07 19:16:18] connection.INFO: check_connection_status.failed_to_connect {"error":"wpdc_response_error","message":"An invalid response was returned from Discourse","http_code":403,"http_body":"{\"errors\":[\"You are not permitted to view the requested resource. The API username or key is invalid.\"],\"error_type\":\"invalid_access\"}"}
[2023-11-07 19:16:51] connection.INFO: check_connection_status.failed_to_connect {"error":"wpdc_response_error","message":"An invalid response was returned from Discourse","http_code":403,"http_body":"{\"errors\":[\"You are not permitted to view the requested resource. The API username or key is invalid.\"],\"error_type\":\"invalid_access\"}"}
[2023-11-07 19:55:28] connection.INFO: check_connection_status.failed_to_connect {"error":"wpdc_response_error","message":"An invalid response was returned from Discourse","http_code":403,"http_body":"{\"errors\":[\"You are not permitted to view the requested resource. The API username or key is invalid.\"],\"error_type\":\"invalid_access\"}"}
[2023-11-07 19:57:56] connection.INFO: check_connection_status.failed_to_connect {"error":"wpdc_response_error","message":"An invalid response was returned from Discourse","http_code":403,"http_body":"{\"errors\":[\"You are not permitted to view the requested resource. The API username or key is invalid.\"],\"error_type\":\"invalid_access\"}"}
I have the key created correctly, so not really sure what’s next…any ideas?
As @Arkshine has noted, the Publishing Username needs to be set to an admin user’s username, not to their full name.
You haven’t posted your full API Key here, but you need to be very careful about posting anything that contains API Keys from your Discourse site. If it was my site, I’d probably generate a new API Key now and update the API Key setting on WordPress to use the new key.
@angus, would it be worth blocking out the value of the API Key setting in the plugin’s UI? Doing that might highlight the fact that the key needs to be protected. It would also make it easier to post screenshots of the plugin’s Connection status page.
Thanks Simon, yeah I created another one, so no problem there.
It would be helpful if in the documentation in the discourse plugin it was more clear about the discourse username, probably many people try this and give up, don’t bother coming over here to ask. You could give an example of the url and how to find it…like was done in this thread.
It’s so silly because I renamed system to have something to do with our brand (the user under which the published posts appear), but the updates revert its name. Breaking the connection from WP…
Hey there @Firsh, sorry you’re having issues. Could you please create a new topic in Support > WordPress and describe the issue you’re having in a bit more detail? The steps you took, the behaviour you were expecting, and any logs, screenshots and relevant links. Thanks!
It’s the same thing, this topic actually helped shed light on the issue. Like OP, I also had something non-standard written in the publishing user(name) field.
Yeah but I opened that topic too because the username reverting is a different problem (if it’s unexpected by others as well), this was merely a side effect.