跳至内容

"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.

已提问 1 年前118 查看次数
2 回答
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

已回答 1 年前
  • 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?
专家
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。