# Publish posts to discourse using WP plugin throws errror

**URL:** https://meta.discourse.org/t/publish-posts-to-discourse-using-wp-plugin-throws-errror/322830
**Category:** Support
**Tags:** wordpress
**Created:** [August 22, 2024, 5:58am UTC](https://meta.discourse.org/t/publish-posts-to-discourse-using-wp-plugin-throws-errror/322830 "2024-08-22T05:58:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cyriac15](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyriac15/32/334590_2.png) [@cyriac15](https://meta.discourse.org/u/cyriac15)
#### Post date: [August 22, 2024, 5:58am UTC](https://meta.discourse.org/t/publish-posts-to-discourse-using-wp-plugin-throws-errror/322830/1 "2024-08-22T05:58:17Z")

</div>

Hi,  
I am using discourse WordPress plugin and it was working fine. I was able to publish posts from WP admin. Currently what happens is like when I Publish the post it throws error  
**There has been an error publishing your post: You are not permitted to view the requested resource. The API username or key is invalid…**

I checked the API settings and username and it was fine. In order to confirm the configuration I tried curl request in postman and it returned 200 status.  
Can someone help me on this?

Few days back I had upgraded the PHP version. Not sure if this has any impact on that.

---

<div class="post-metadata">

### Author: ![cyriac15](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cyriac15/32/334590_2.png) [@cyriac15](https://meta.discourse.org/u/cyriac15)
#### Post date: [September 12, 2024, 6:53am UTC](https://meta.discourse.org/t/publish-posts-to-discourse-using-wp-plugin-throws-errror/322830/2 "2024-09-12T06:53:11Z")

</div>

The API key and username is working fine when tested with Postmam. But when submitting from WP admin its throwing error  
**There has been an error publishing your post: You are not permitted to view the requested resource. The API username or key is invalid..**

Can someone help me on this?
