# Authentication Problem with WordPress HTTP Request

**URL:** <https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093>\
**Category:** Questions\
**Created:** [September 25, 2024, 9:08pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093 "2024-09-25T21:08:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/martin_neumann/32/7982_2.png) [@Martin\_Neumann](https://community.n8n.io/u/Martin_Neumann)\
**Post date:** [September 25, 2024, 9:08pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/1 "2024-09-25T21:08:54Z")

</div>

## Describe the problem/error/question

I have created a WordPress credential and it works fine for the WordPress node. Now I want to make a HTTP DELETE Request to the following endpoint:  
[https://www.saudeplena.org/wp-json/wp/v2/comments/](https://www.saudeplena.org/wp-json/wp/v2/comments/)  
and the same credential that otherwise works is giving me a permission error. How is that, the Administrator has no permissions?

## What is the error message (if any)?

Without permission to exclude this comment

## Please share your workflow

## Share the output returned by the last node

## Information on your n8n setup

- **n8n version:** 1.58.2
- **Database (default: SQLite):** Postgres
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** queue
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** docker
- **Operating system:** Linux

---

<div class="post-metadata">

**Author:** ![ihortom](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ihortom/32/11473_2.png) [@ihortom](https://community.n8n.io/u/ihortom)\
**Post date:** [September 27, 2024, 10:34pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/4 "2024-09-27T22:34:30Z")

</div>

Hey @Martin_Neumann , you need to make sure the URL resolves to the correct path. You are using an expression in the URL, `https://www.saudeplena.org/wp-json/wp/v2/comments/{{ $('Webhook').item.json.body.comment_id }}`. Perhaps the expression produces undefined value.

---

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/martin_neumann/32/7982_2.png) [@Martin\_Neumann](https://community.n8n.io/u/Martin_Neumann)\
**Post date:** [September 29, 2024, 2:35pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/5 "2024-09-29T14:35:23Z")

</div>

I looked it up and a request to:  
[https://www.saudeplena.org/wp-json/wp/v2/comments/5250](https://www.saudeplena.org/wp-json/wp/v2/comments/5250)  
created the error for example.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [September 30, 2024, 8:48am UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/6 "2024-09-30T08:48:34Z")

</div>

Hey @Martin_Neumann,

If I follow that same URL without authenticating I get the same message, In this case I suspect either the comment is not public or maybe it doesn’t exist which is why it says the API can’t read it.

Looking a bit deeper if you find a comment that does exist on your site like `5240` you can see the response is very different: [https://www.saudeplena.org/wp-json/wp/v2/comments/5240](https://www.saudeplena.org/wp-json/wp/v2/comments/5240)

---

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/martin_neumann/32/7982_2.png) [@Martin\_Neumann](https://community.n8n.io/u/Martin_Neumann)\
**Post date:** [September 30, 2024, 7:33pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/7 "2024-09-30T19:33:57Z")

</div>

Yes the comment is not public, but the admin is supposed to be able to manipulate it. The credentials I use to access are supposed to be admin credentials.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [September 30, 2024, 9:46pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/8 "2024-09-30T21:46:46Z")

</div>

Hey @Martin_Neumann,

Are you also able to get the comment? We don’t control what the api allows access to so assuming the ID and credential is correct this could be an issue with Wordpress. Have you tried making the same request with something like Postman to see if that works?

What is the status of the comment in wp-admin?

---

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/martin_neumann/32/7982_2.png) [@Martin\_Neumann](https://community.n8n.io/u/Martin_Neumann)\
**Post date:** [October 1, 2024, 7:50pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/9 "2024-10-01T19:50:48Z")

</div>

In WP Admin the comment is pending approval. What happened is that I could read all public resources but nothing that required authentication. Found out the problem was with the credentials.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 8, 2024, 7:51pm UTC](https://community.n8n.io/t/authentication-problem-with-wordpress-http-request/55093/10 "2024-10-08T19:51:00Z")

</div>

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