Copy
grpcurl \
-d '
{
"content": "My text message",
"fromSubscriber": "+47xxxxxxxx",
"toAddress": "+47yyyyyyyy"
}
' \
sandbox.api.shamrock.wgtwo.com:443 \
wgtwo.sms.v1.SmsService/SendTextFromSubscriber
Copy
package com.example.sms
import com.wgtwo.api.v1.sms.SmsProto.SendTextFromSubscriberRequest
import com.wgtwo.api.v1.sms.SmsServiceGrpc
import io.grpc.ManagedChannelBuilder
fun main() {
val channel = ManagedChannelBuilder.forAddress("sandbox.api.shamrock.wgtwo.com", 443).build()
val stub = SmsServiceGrpc.newBlockingStub(channel)
val request = SendTextFromSubscriberRequest.newBuilder().apply {
fromSubscriber = "+4799900111"
toAddress = "+4799900112"
content = "Hello, World!"
}.build()
println("Request:
$request")
val response = stub.sendTextFromSubscriber(request)
println("Response:
$response")
}