我试图使用 boto3 发送带有精确定位的消息,但 update_endpoint 和 send_messages 的函数不断返回我找不到资源
client = boto3.client('pinpoint', region_name="us-east-1", aws_access_key_id="xxx", aws_secret_access_key="xxx")
client.update_endpoint(ApplicationId="xxx",EndpointId='+573163781068',EndpointRequest={'Address': '+573163781068','ChannelType': 'SMS','Location': {'Country': 'CO'}})
client.send_messages(ApplicationId="xxx", MessageRequest={'Addresses': {'+573163781068': {'ChannelType': 'SMS'}}, 'MessageConfiguration': {'SMSMessage': {'Body': 'hola desde libreria', 'MessageType': 'TRANSACTIONAL'}}})
返回我的错误是:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Applications/MAMP/htdocs/enviroment/kleanapp/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Applications/MAMP/htdocs/enviroment/kleanapp/lib/python3.7/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.NotFoundException: An error occurred (NotFoundException) when calling the SendMessages operation: Resource not found
提前感谢您的帮助