简体   繁体   English

AWS API 网关密钥问题

[英]AWS API Gateway key issue

I am trying to use aws API Gateway with authentication.我正在尝试使用 aws API 网关进行身份验证。 I created an API key and set requirement to true in Method Request.我创建了一个 API 密钥并在方法请求中将要求设置为 true。 But when I'm sending the request with specified "x-api-key" in header, I still get但是当我在 header 中使用指定的“x-api-key”发送请求时,我仍然得到

 {
  "message": "Forbidden"
 }

Is there anything more that I need to configure or something, for fixing this.为了解决这个问题,我还需要配置什么吗? Thank you in advance.先感谢您。

Whilst creating the API key is part of the solution you will also need to create a usage plan and attach your API key to it.在创建 API 密钥是解决方案的一部分时,您还需要创建使用计划并将 API 密钥附加到它。

Once this has been completed you'll want to associate it with the API stage(s) that your API key should work with.完成此操作后,您需要将其与 API 密钥应使用的 API 阶段相关联。

This guide should provide additional information for creating this 本指南应提供更多信息以创建此

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM