| Type: | Package |
| Title: | Client for the 'SMS Gora' SMS Gateway |
| Version: | 1.0.1 |
| Description: | Client for the 'SMS Gora' SMS Gateway https://tekservix.com/smsgora/, which sends and receives text messages (SMS, Short Message Service) through your own 'Android' phones and SIM cards. Send single, scheduled and bulk messages, check delivery status, read received messages, manage linked phones and event notifications, and verify their signatures. A 'Tekservix' account with 'SMS Gora' and an API key are required. |
| License: | MIT + file LICENSE |
| URL: | https://tekservix.com/smsgora/docs/, https://github.com/TekservixHQ/smsgora-r |
| BugReports: | https://github.com/TekservixHQ/smsgora-r/issues |
| Depends: | R (≥ 4.1.0) |
| Imports: | httr2 (≥ 1.0.0), jsonlite, openssl |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| Encoding: | UTF-8 |
| Language: | en-US |
| Config/roxygen2/version: | 8.1.1 |
| NeedsCompilation: | no |
| Packaged: | 2026-11-12 09:27:14 UTC; runner |
| Author: | Joseph Niyogushimwa [aut, cre], Tekservix [cph, fnd] |
| Maintainer: | Joseph Niyogushimwa <niyogushimwaj967@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-12-04 16:20:21 UTC |
smsgora: Client for the 'SMS Gora' SMS Gateway
Description
SMS Gora SMS Gateway by Tekservix: send and receive SMS through your own
Android phones and SIM cards. You need a Tekservix account with SMS Gora,
at least one phone linked with the SMS Gora app, and an API key (it starts
with sgk_). Create one at https://tekservix.com/smsgora/. API reference:
https://tekservix.com/smsgora/docs/.
Details
Start with smsgora_client(), then call the other smsgora_* functions.
Every call returns the data part of the API answer as a list. API errors
are raised as conditions of class smsgora_error, which carry the HTTP
status, the API message and the raw body.
Author(s)
Maintainer: Joseph Niyogushimwa niyogushimwaj967@gmail.com
Authors:
Joseph Niyogushimwa niyogushimwaj967@gmail.com
Other contributors:
Tekservix [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/TekservixHQ/smsgora-r/issues
Cancel a queued or scheduled message
Description
Cancel a queued or scheduled message
Usage
smsgora_cancel_message(client, message_id)
Arguments
client |
A client from |
message_id |
Message ID. |
Value
The cancelled message.
Examples
## Not run:
smsgora_cancel_message(smsgora_client("sgk_your_key"), 1873)
## End(Not run)
Create an SMS Gora client
Description
Create an SMS Gora client
Usage
smsgora_client(
key = Sys.getenv("SMSGORA_API_KEY"),
base_url = "https://tekservix.com/smsgora/api/v1"
)
Arguments
key |
Your SMS Gora API key (starts with |
base_url |
API base URL. Change it only for tests or a proxy. |
Value
An object of class smsgora_client, used by every other function.
Examples
client <- smsgora_client("sgk_your_key")
Add a webhook
Description
Add a webhook
Usage
smsgora_create_webhook(client, url, events, device_id = NULL)
Arguments
client |
A client from |
url |
HTTPS address that receives the events. |
events |
Character vector of events, e.g. |
device_id |
Optional phone ID to limit the webhook to one phone. |
Value
The new webhook, including its signing secret.
Examples
## Not run:
smsgora_create_webhook(smsgora_client("sgk_your_key"),
"https://example.com/sms-hook", c("sms.received", "sms.failed"))
## End(Not run)
Remove a webhook
Description
Remove a webhook
Usage
smsgora_delete_webhook(client, webhook_id)
Arguments
client |
A client from |
webhook_id |
Webhook ID. |
Value
The API confirmation.
Examples
## Not run:
smsgora_delete_webhook(smsgora_client("sgk_your_key"), 4)
## End(Not run)
Get your account
Description
Get your account
Usage
smsgora_get_account(client)
Arguments
client |
A client from |
Value
Your plan, limits and usage.
Examples
## Not run:
smsgora_get_account(smsgora_client("sgk_your_key"))
## End(Not run)
Get a bulk batch
Description
Get a bulk batch
Usage
smsgora_get_batch(client, batch_id)
Arguments
client |
A client from |
batch_id |
Batch ID returned by |
Value
The batch and its progress.
Examples
## Not run:
smsgora_get_batch(smsgora_client("sgk_your_key"), 311)
## End(Not run)
Get one phone
Description
Get one phone
Usage
smsgora_get_device(client, device_id)
Arguments
client |
A client from |
device_id |
Phone ID. |
Value
The phone and its status.
Examples
## Not run:
smsgora_get_device(smsgora_client("sgk_your_key"), 12)
## End(Not run)
Get one message
Description
Get one message
Usage
smsgora_get_message(client, message_id)
Arguments
client |
A client from |
message_id |
Message ID. |
Value
The message, with its status (queued, dispatched, sent, delivered, failed or cancelled).
Examples
## Not run:
smsgora_get_message(smsgora_client("sgk_your_key"), 1873)
## End(Not run)
List your linked phones
Description
List your linked phones
Usage
smsgora_list_devices(client)
Arguments
client |
A client from |
Value
A list of phones with their status.
Examples
## Not run:
smsgora_list_devices(smsgora_client("sgk_your_key"))
## End(Not run)
List messages
Description
List messages
Usage
smsgora_list_messages(client, ...)
Arguments
client |
A client from |
... |
Filters passed as query parameters: |
Value
A list with the matching messages and paging details.
Examples
## Not run:
smsgora_list_messages(smsgora_client("sgk_your_key"), status = "failed", limit = 20)
## End(Not run)
List received SMS
Description
List received SMS
Usage
smsgora_list_received_sms(client, device_id = NULL, ...)
Arguments
client |
A client from |
device_id |
Optional phone ID; all phones when |
... |
Query parameters such as |
Value
A list with the received messages and paging details.
Examples
## Not run:
smsgora_list_received_sms(smsgora_client("sgk_your_key"), device_id = 12, limit = 10)
## End(Not run)
List your webhooks
Description
List your webhooks
Usage
smsgora_list_webhooks(client)
Arguments
client |
A client from |
Value
A list of webhooks.
Examples
## Not run:
smsgora_list_webhooks(smsgora_client("sgk_your_key"))
## End(Not run)
Call any SMS Gora endpoint
Description
Low-level access for endpoints that have no helper of their own.
Usage
smsgora_request(client, method, path, body = NULL, query = NULL)
Arguments
client |
A client from |
method |
HTTP method, e.g. |
path |
Path after the base URL, e.g. |
body |
Optional list sent as JSON. |
query |
Optional named list of query parameters. |
Value
The data part of the API answer, as a list.
Examples
## Not run:
client <- smsgora_client("sgk_your_key")
smsgora_request(client, "GET", "/account")
## End(Not run)
Send different texts to different people
Description
Bulk sending from one phone, up to 5,000 recipients per call.
Usage
smsgora_send_bulk_sms(client, device_id, messages, template = NULL)
Arguments
client |
A client from |
device_id |
ID of the phone to send from. |
messages |
A list of messages; each is a list with |
template |
Optional text used for messages that have no |
Value
A list describing the batch, including its ID.
Examples
## Not run:
client <- smsgora_client("sgk_your_key")
smsgora_send_bulk_sms(client, 12, list(
list(recipients = "+250788123456", message = "Hi Alice, your table is ready"),
list(recipients = c("+250722000000", "+250733000000"))
), template = "Thank you for visiting us")
## End(Not run)
Send an SMS
Description
Sends one text to one or more numbers (up to 1,000), from your best online phone or from the phone you choose.
Usage
smsgora_send_sms(
client,
to,
message,
device_id = NULL,
sim_slot = NULL,
schedule_at = NULL
)
Arguments
client |
A client from |
to |
Character vector of phone numbers in international format. |
message |
The text to send. |
device_id |
Optional ID of the phone to send from. |
sim_slot |
Optional SIM: 0 = SIM 1, 1 = SIM 2. |
schedule_at |
Optional ISO 8601 time to send later. |
Value
A list with the queued message IDs.
Examples
## Not run:
client <- smsgora_client("sgk_your_key")
smsgora_send_sms(client, "+250788123456", "Your order #1042 has shipped.")
smsgora_send_sms(client, c("+250788123456", "+250722000000"),
"Reminder: appointment tomorrow",
device_id = 12, sim_slot = 1, schedule_at = "2026-12-01T08:00:00Z")
## End(Not run)
Verify a webhook signature
Description
Checks the X-SmsGora-Signature header (sha256= followed by the hex
HMAC-SHA256 of the raw request body, keyed with your webhook secret). The
comparison takes the same time whether or not the signature matches.
Usage
smsgora_verify_webhook(raw_body, signature, secret)
Arguments
raw_body |
The raw request body, as a string or raw vector, exactly as received. |
signature |
Value of the |
secret |
Your webhook secret. |
Value
TRUE when the signature is valid, otherwise FALSE.
Examples
body <- '{"event":"sms.received"}'
sig <- "sha256=313fe9b54923f49c8b94d50c5b96fa44f3f5a7ca90ef52fd55afb2bfd3ae8f60"
smsgora_verify_webhook(body, sig, "whsec_test")