"We are getting REST API forbidden error from server : https://imgur.com/a/bgLjkdA in wordpress dashboard.

0

"We are getting REST API forbidden error from server : https://imgur.com/a/bgLjkdA in wordpress dashboard.

asked a month ago34 views
2 Answers
0

Based on the error message you're seeing in the WordPress dashboard, it appears you're encountering a "Forbidden" error when trying to access the REST API. This type of error can occur due to several reasons in an AWS environment:

  1. API Key Configuration: If you're using Amazon API Gateway, ensure that your API key is properly configured. The API key should be added to a usage plan and the usage plan should be assigned to the correct stage. Verify that the API key you're using is correct and that it's being sent with the "X-Api-Key" header in the request.

  2. Stage Deployment: Make sure that the API stage is properly deployed in API Gateway.

  3. Method Configuration: Verify that the HTTP method you're using (GET, POST, etc.) is correctly configured for the resource you're trying to access.

  4. Authorization: Check if there are any other authorization mechanisms enabled that might be blocking access.

  5. UsagePlans Feature: Ensure that your API Gateway account is migrated to use the UsagePlans feature. You can check this by using the AWS CLI command "aws apigateway get-account" and looking for "UsagePlans" in the features list.

  6. WordPress Configuration: In a WordPress context, this error could also be related to plugin conflicts, theme issues, or incorrect permalink settings. Try deactivating plugins, switching to a default theme, and resetting permalinks to see if it resolves the issue.

  7. Server Permissions: Ensure that the web server user running WordPress has the necessary permissions to access and update the WordPress directory.

If you've checked all these points and are still experiencing issues, you may need to review your server logs or AWS CloudWatch logs for more detailed error messages to pinpoint the exact cause of the problem.
Sources
API Gateway - Execution failed: Resource forbidden due to invalid API Key | AWS re:Post
WordPress REST API Endpoint Not Accessible on Elastic Beanstalk with Nginx | AWS re:Post
Wordpress site unable to connect to AWS to update plugins | AWS re:Post

profile picture
answered a month ago
  • we checked all logs and checked with wordpress, no issues from our side.

    Please check firewall and cloudfare and resolve it from your side.

0

More information is needed about the APi Error.

The APi is hosted on CloudFlare. Currently it doesnt look AWS Related

  1. Where is the APi Hosted?
  2. Is this AWS related?
profile picture
EXPERT
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions