So, after following through the aws docs I have completed the process of DLT Registration and have successfully received a Certificate (BSNL Dlt) with the EntityID.
Now in the DLT console I have created the SenderID and TemplateID as well (both were approved by the DLT) and am using the same to send an SMS to my users.
I raised a case with AWS also to register my SenderID and I do see the same has been approved and AWS Pinpoint SMS reflects this
Following is the Code that I am using :
async publishToPhone(phoneNumber, message) {
var params = {
PhoneNumber: phoneNumber,
MessageStructure: 'string',
Message: message,
MessageAttributes: {
"AWS.SNS.SMS.SenderID": {
DataType: 'String', StringValue: 'TNPNWS'
},
"AWS.SNS.SMS.SMSType": {
DataType: 'String', StringValue: 'Promotional'
},
"AWS.MM.SMS.EntityId": {
DataType: 'String', StringValue: '1401599xxxxxx65494'
},
"AWS.MM.SMS.TemplateId": {
DataType: 'String', StringValue: '1407170xxxxx49047'
}
}
};
const data = await sns.send(new PublishCommand(params));
if (!data) {
throw Error(`There was an error in publishing ${params.Message}`);
}
return data;
}
Have you registered the SenderId with India? It is next to impossible to get an approval for local routes in India unless you are an Indian company.