Greetings, I'm trying to use AWS world wide messaging service using C#/.Net Core.
However I do not receive the message in my phone number. Below is the code:
public static async Task<PublishResponse> sendSMS() { string accessKey = "my Key"; string secretAccessKey = "my secret key"; var client = new AmazonSimpleNotificationServiceClient(accessKey, secretAccessKey, RegionEndpoint.USEast1); string phoneNumber = "mynumber"; PublishRequest req = new PublishRequest(); req.Message = "Hellloooo from core"; req.PhoneNumber = "+2" + phoneNumber; PublishResponse res = await client.PublishAsync(req); return res; }
And I invoke this method in the main function:
public static void Main(string[] args) { var respond = sendSMS(); }
I appreciate if anyone could help me with this. thanks in advance