# Discourse wordpress plugin suddenly not working

**URL:** https://meta.discourse.org/t/discourse-wordpress-plugin-suddenly-not-working/305269
**Category:** WordPress
**Created:** [April 24, 2024, 2:15pm UTC](https://meta.discourse.org/t/discourse-wordpress-plugin-suddenly-not-working/305269 "2024-04-24T14:15:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![seanadl](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@seanadl](https://meta.discourse.org/u/seanadl)
#### Post date: [April 24, 2024, 2:15pm UTC](https://meta.discourse.org/t/discourse-wordpress-plugin-suddenly-not-working/305269/1 "2024-04-24T14:15:49Z")

</div>

Hi all,

Nothing has been changed my end, but as of today, suddenly new posts are not being posted to discourse. When I look at the plugin in wordpress, it now says " **You are not connected to Discourse. Check that your connection settings are correct. If the issue persists, enable connection logs and check Logs.**"

When I check the logs there are lot of errors such as these:

```plaintext
[2024-04-24 13:58:32] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"62","wp_post_id":253237,"http_code":403} 
[2024-04-24 14:02:54] 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\"}"} 
[2024-04-24 14:03: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\"}"} 
[2024-04-24 14:03:19] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"36","wp_post_id":253086,"http_code":403} 
[2024-04-24 14:03:45] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"59","wp_post_id":253215,"http_code":403} 
[2024-04-24 14:03:54] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"53","wp_post_id":253147,"http_code":403} 
[2024-04-24 14:04:09] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"37","wp_post_id":252899,"http_code":403} 
[2024-04-24 14:04:49] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"61","wp_post_id":253240,"http_code":403} 
[2024-04-24 14:05:17] 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\"}"} 
[2024-04-24 14:06:36] 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\"}"} 
[2024-04-24 14:07:34] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"13","wp_post_id":252964,"http_code":403} 
[2024-04-24 14:07:40] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"35","wp_post_id":253085,"http_code":403} 
[2024-04-24 14:08: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\"}"} 
[2024-04-24 14:08:57] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"22","wp_post_id":253029,"http_code":403} 
[2024-04-24 14:11:25] 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\"}"} 
[2024-04-24 14:12:24] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"26","wp_post_id":253043,"http_code":403} 
[2024-04-24 14:12:25] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"54","wp_post_id":253148,"http_code":403} 
[2024-04-24 14:13:21] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"28","wp_post_id":253052,"http_code":403} 
[2024-04-24 14:13:24] comment.ERROR: sync_comments.response_error {"message":"Forbidden","discourse_topic_id":"14","wp_post_id":252992,"http_code":403} 
[2024-04-24 14:14:10] 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 tried creating a new key, and saving it in wordpress, but its not working.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 24, 2024, 2:43pm UTC](https://meta.discourse.org/t/discourse-wordpress-plugin-suddenly-not-working/305269/2 "2024-04-24T14:43:28Z")

</div>

Hi,

What is the _User level_ and _Scope_ of the API Key that you created?

It should be either:

- **User Level** : Single User
- **User** : _An `admin` account_
- **Scope** : Global

Or:

- **User Level** : All users
- **Scope** : Global

Can you confirm? 🤔

---

<div class="post-metadata">

### Author: ![seanadl](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@seanadl](https://meta.discourse.org/u/seanadl)
#### Post date: [April 24, 2024, 4:58pm UTC](https://meta.discourse.org/t/discourse-wordpress-plugin-suddenly-not-working/305269/3 "2024-04-24T16:58:51Z")

</div>

I was doing all users \> global. But that wasn’t working (it had been working up to this morning). So just now I tried a single user and it seems to finally work.
