27-06-23, 07:36 PM
Dim token As String = "TOKEN_HERE"
Dim url As String = "https://app.mobile.net.sa/api/v1/send"
Dim client As New RestSharp.RestClient(url)
Dim request As New RestSharp.RestRequest(RestSharp.Method.POST)
request.AddHeader("Content-Type", "application/json")
request.AddHeader("Authorization", "Bearer " & token)
Dim body As Object = New With {
.number = "966511111111",
.senderName = "Mobile.SA",
.sendAtOption = "Now",
.messageBody = "Hello, How are you?"
}
request.AddJsonBody(body)
Dim response As RestSharp.IRestResponse = client.Execute(request)
Dim responseContent As String = response.Content
Dim url As String = "https://app.mobile.net.sa/api/v1/send"
Dim client As New RestSharp.RestClient(url)
Dim request As New RestSharp.RestRequest(RestSharp.Method.POST)
request.AddHeader("Content-Type", "application/json")
request.AddHeader("Authorization", "Bearer " & token)
Dim body As Object = New With {
.number = "966511111111",
.senderName = "Mobile.SA",
.sendAtOption = "Now",
.messageBody = "Hello, How are you?"
}
request.AddJsonBody(body)
Dim response As RestSharp.IRestResponse = client.Execute(request)
Dim responseContent As String = response.Content
