I need to send SNS push notification to multiple devices passing the array of device tokens
Currently I'm sending the push message to SNS using this steps:
Creating the endpoint:
pl, err := svc.CreatePlatformEndpoint(&sns.CreatePlatformEndpointInput{
PlatformApplicationArn: aws.String(topic),
Token: aws.String(n.DeviceToken), // just one device token
})
Sending the message to endpoint:
params := &sns.PublishInput{
Message: aws.String(payload),
TargetArn: aws.String(*pl.EndpointArn),
MessageStructure: aws.String("json"),
}
I have not seen a way to send one push message to multiple devices using just one request. Is it possible?
Like this example to illustrate:
pl, err := svc.CreatePlatformEndpoint(&sns.CreatePlatformEndpointInput{
PlatformApplicationArn: aws.String(topic),
Token: []aws.String{token01, token02, token03}, //array of device tokens
})
Please help me out, To send SNS push notification message to multiple devices using TargetArn: // as array