【问题标题】:Why did my POST to AWS API Gateway failed?为什么我的 POST 到 AWS API Gateway 失败了?
【发布时间】:2020-05-01 00:14:34
【问题描述】:

我使用 POSTMAN 测试我的 Cloudformation 创建的 API

POST https://6pppnxxxh.execute-api.eu-central-1.amazonaws.com/Prod/users

我明白了

{
    "message": "Missing Authentication Token"
}

我的产品阶段

我仔细检查了 PROD 调用 URL。 如何解决这个问题呢? 我试过卷曲

 curl --header "Content-Type: application/json" --request POST --data '{ "emailaddress" : "acj@rambler.ru,"first name" : "Aca","last name" : "Ljubascikic", "password" : "bbbac_96"}' https://6pppnxxxh.execute-api.eu-central-1.amazonaws.com/Prod/users

同样的问题

{"message":"Missing Authentication Token"}

如何从 CLI 进行测试?

【问题讨论】:

  • 您能否确认此路由的身份验证设置为无?
  • 如何确认Auth设置?

标签: amazon-web-services restful-authentication


【解决方案1】:

根据您的屏幕截图,/Prod/users 是一个PUT 方法,您在命令中使用了POST。我会先确认一下。

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 2017-03-02
    • 1970-01-01
    • 2022-08-16
    • 2020-03-18
    • 1970-01-01
    • 2020-05-21
    • 2015-03-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多