我正试图使用boto3发送pinpoint到的消息,但是update_endpoint和send_messages的函数会使return me资源找不到
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'}}})
返回给我的错误是:
^{pr2}$提前谢谢你的帮助
不需要发送消息。只需删除
update_endpoint
行。在NotFoundException可能来自找不到的应用程序ID。请确保在正确的区域中指定了正确的应用程序ID值。在
您可以使用以下命令查找特定区域的有效应用程序及其ID的列表:
相关问题 更多 >
编程相关推荐