Skip to main content
Every example below uses only fireflo.proto and the standard gRPC library for its language. Replace sms.example.com:8090 with the address your provider gives you, and keep the password out of your source — the examples read it from SMS_PASSWORD.
The examples connect without TLS (-plaintext, an insecure channel), as you would to a gateway on a private network. If your provider gives you a TLS address — often port 443 — use a secure channel instead; each section shows the one-line change.

grpcurl

Server reflection means grpcurl needs no proto file. If your provider has switched reflection off, add -proto fireflo.proto to each command.
With TLS, drop -plaintext. A refusal prints the gRPC code and message; add -v to see the trailers, including the error detail.

Python (grpcio)

Generate the stubs once:

Login, the re-login wrapper, and Send

SendStream

Receipts: Pull, or Subscribe

A Subscribe that ends with SESSION_EXPIRED or UNAVAILABLE is reopened after a fresh Login; what you had not acknowledged is delivered again.

Java (grpc-java)

Generate with the protobuf Gradle or Maven plugin and the protoc-gen-grpc-java plugin; the classes land in package fireflo.v1. You need grpc-netty-shaded (or another transport), grpc-protobuf and grpc-stub.

Login, the re-login wrapper, and Send

On a StatusRuntimeException from sendOne, read errorDetail(e): for OUTCOME_UNKNOWN retry only with the same clientRef; when d.hasRetryAfterSeconds(), wait that long and retry; otherwise fix the request.

SendStream

onNext runs on gRPC’s own threads, so results are read while you write. For a very large batch, check isReady() on a ClientCallStreamObserver (or use ClientResponseObserver) before each write, so your process does not buffer what the gateway is not yet reading.

Receipts with Pull

Go (grpc-go)

Generate with protoc --go_out=. --go-grpc_out=. fireflo.proto (plugins protoc-gen-go and protoc-gen-go-grpc). The package name is fireflov1; the import path depends on your module and --go_opt settings.

Login, the re-login wrapper, and Send

Optional proto fields are pointers in Go: set them with proto.String, proto.Bool and proto.Int32, and read them with the generated Get… methods.

Receipts with Subscribe

Errors and status codes

What each refusal means, and which to retry.

The proto file

The contract these examples are generated from.