/// <summary> /// Send a SMS message. /// </summary> /// <param name="request">The SMS message request</param> /// <param name="creds">(Optional) Overridden credentials for only this request</param> /// <exception cref="VonageSmsResponseException">Thrown when the status of a message is non-zero or response is empty</exception> /// <returns></returns> public async Task <SendSmsResponse> SendAnSmsAsync(SendSmsRequest request, Credentials creds = null) { var result = await ApiRequest.DoPostRequestUrlContentFromObjectAsync <SendSmsResponse>( ApiRequest.GetBaseUri(ApiRequest.UriType.Rest, "/sms/json"), request, creds ?? Credentials ); ValidSmsResponse(result); return(result); }
public SendSmsResponse SendAnSms(SendSmsRequest request, Credentials creds = null) { return(SendAnSmsAsync(request, creds).GetAwaiter().GetResult()); }