REST API Response: (403) Forbidden

aircraft.66ghz.com

The error messages that I’m having issues with are as follows:

"When testing the REST API, an unexpected result was returned:

REST API Endpoint: https://aircraft.66ghz.com/wp-json/wp/v2/types/post?context=edit
REST API Response: (403) Forbidden
(please share the FULL error message you see, if applicable)"

How do I correct this error?

Hi howard53,

When 403, it’s because you are not authenticated from within the API. Your endpoint is related to editing a post, so meaning you need to have authenticated for the right to edit the post before reaching this.

Meanwhile, you also need to know that even if you logged in admin panel, you’re still considered unauthenticated in the REST API request, as you need to set some kind of token or authentication header in each request as per WordPress specification.

You might want to look that up here:

If you’re developing an application, you might also want to know about the security feature here on InfinityFree, which might be in your way if you attempt curl elsewhere, or outside of your existing session to the server.

Cheers!

5 Likes

I’m also suspecting the security system, I’ve shared my observations in a similar post:

7 Likes

Thanks so much for responding so quickly, I’m looking into your suggestion as we speak. Again thanks

Howard53

2 Likes

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