在python上发送SMS时,获取'botocore.exceptions.ParamValidationError:参数验证失败'错误

问题描述 投票:0回答:1
我正在研究一种代码,当它们超过200英镑时,它会从ATM发送文本消息,但是,当我运行代码时,我得到了错误

botocore.exceptions.ParamValidationError:参数验证失败:输入中的未知参数:“ PhoneNumber”,必须为以下之一:TopicArn,TargetArn,消息,主题,MessageStructure,MessageAttributes

我的代码是:

import boto3 client = boto3.client('sns','eu-west-1') client.publish(PhoneNumber='+44XXXXXXXXXX', Message= 'Hello')

X在哪里引用电话号码
python sms boto3 amazon-sns
1个回答
0
投票
使用我的凭据和电话号码在本地运行此消息,不会出现任何问题-
© www.soinside.com 2019 - 2024. All rights reserved.