amazon-web-services - AWS Pinpoint - 未找到资源作为响应
问题描述
尝试通过 pinpoint 发送短信给我{消息:“找不到资源”}。
我按预期调用端点并在文档中描述:
这里是 CURL 请求,也许任何人都可以发现问题。非常感谢!
curl -X POST \
'https://pinpoint.eu-central-1.amazonaws.com/v1/apps/328f78f258854f1da353b957bd68ed27/messages' \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: AWS4-HMAC-SHA256 Credential=XXX/20200109/eu-central-1/mobiletargeting/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=XXXXXXXXXec8b0c04e6ab522c42ecdfa52ad4df7ace4deb1574eb33' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 617' \
-H 'Content-Type: application/json' \
-H 'Host: pinpoint.eu-central-1.amazonaws.com' \
-H 'Postman-Token: XXXXXXX-49e3-4311-8a50-45391d3ed311,7234e3c3-678e-4687-8d06-11406d96d67b' \
-H 'User-Agent: PostmanRuntime/7.20.1' \
-H 'X-Amz-Content-Sha256: cb53ba323130652362fd17ffa226915ba377b822ee7115b4b3e965b731888401' \
-H 'X-Amz-Date: 20200109T163151Z' \
-H 'cache-control: no-cache' \
-d '{
"Context": {
"string": "string"
},
"MessageConfiguration": {
"DefaultMessage": {
"Body": "string",
"Substitutions": {
"string": [
"string"
]
}
},
"SMSMessage": {
"Body": "string",
"Substitutions": {
"string": [
"string"
]
},
"SenderId": "string",
"MessageType": "TRANSACTIONAL",
"Keyword": "string",
"OriginationNumber": "string"
}
}
}'
{"Message":"Resource not found"}
解决方案
问题是我一直在使用错误的区域,它是 us-west-2 而不是 eu-central-1。
推荐阅读
- python-3.x - 如何通过 Huggingface 将分类与零镜头分类并行化?
- django - Django-widget-tweaks:ModuleNotFoundError:没有名为“widget_tweaks”的模块
- rest - 如何使用不可变资源处理 PUT 端点
- javascript - React - dangerouslySetInnerHTML 被显示为纯文本
- reactjs - 尝试将类应用于样式组件以进行 onclick 事件
- powershell - 返回节点计数为 0 的 PowerShell 脚本
- c# - 枚举及其整数值之间的 AutoMapper 映射因 ReverseMap 而失败
- python - 我对 django 中的模型关系感到困惑
- node.js - 如何在 Nodejs 中将图像下载到客户端?
- javascript - WebRTC 无法在同一连接中回复包含多个轨道的报价