I created on aws a "Push notification platform - Apple iOS (development)"
I am just trying to create a new endpoint from AWS SDK JS v3
const deviceId = 'a0b1c2d3e4f5' // would be a real deviceId
const createEndpointResponse = await client.send(
new CreatePlatformEndpointCommand({
PlatformApplicationArn: platformArn,
Token: deviceId,
})
)
const createTopicResponse = await client.send(
new CreateTopicCommand({
DataProtectionPolicy: 'STRING_VALUE',
Name: 'PushNotificationTestTopic',
})
)
console.log('Device-specific topic ARN', createTopicResponse.TopicArn )
const topicArn = createTopicResponse.TopicArn
I get this error
{"errorType": "InvalidParameterException", "errorMessage": "Invalid parameter: DataProtectionPolicy Reason: Failed to parse the data protection policy"
I created on aws a "Push notification platform - Apple iOS (development)"
I am just trying to create a new endpoint from AWS SDK JS v3
const deviceId = 'a0b1c2d3e4f5' // would be a real deviceId
const createEndpointResponse = await client.send(
new CreatePlatformEndpointCommand({
PlatformApplicationArn: platformArn,
Token: deviceId,
})
)
const createTopicResponse = await client.send(
new CreateTopicCommand({
DataProtectionPolicy: 'STRING_VALUE',
Name: 'PushNotificationTestTopic',
})
)
console.log('Device-specific topic ARN', createTopicResponse.TopicArn )
const topicArn = createTopicResponse.TopicArn
I get this error
{"errorType": "InvalidParameterException", "errorMessage": "Invalid parameter: DataProtectionPolicy Reason: Failed to parse the data protection policy"
I ended removing
"DataProtectionPolicy: 'STRING_VALUE',"
it now works