您好我正在尝试使用带有 PHP 开发工具包的 AWS Pinpoint 发送消息,但出现错误。任何想法为什么?这是我的代码:
$client = new PinpointClient([
'version' => 'latest',
'region' => 'us-east-1',
'credentials' => [
'key' => 'MYIAMAWSKEY',
'secret' => 'MYAWSSECRET',
]
]);
$result = $client->sendMessages([
'ApplicationId' => 'MyAppId',
'MessageRequest' => [
'Addresses' => [
'AnIOSDeviceToken' => [
'BodyOverride' => 'aaa',
'ChannelType' => 'APNS',
'RawContent' => 'bbb',
'Context' => ['ccc' => '222'],
'TitleOverride' => 'ddd',
],
],
],
'MessageConfiguration' => [
'APNSMessage' => [
'Action' => 'OPEN_APP',
'Body' => 'Hello',
'RawContent' => 'World',
'SilentPush' => false,
'Title' => 'Hello World!!!',
],
],
]);
我收到以下错误:
DeliveryStatus: 'PERMANENT_FAILURE'
StatusCode: 400
StatusMessage: Invalid notification: Notification is malformed