Description Usage Arguments Value Author(s) Examples
View source: R/notifications.R
Sends a notification to a user or users. Core API call Send Notifications
1 | send_notifications(server_name, profile_id, access_token, message, users)
|
server_name |
String of the iFormBuilder server name. |
profile_id |
Integer of the iFormBuilder profile ID. |
access_token |
Access token produced by |
message |
String containing the message to send. |
users |
Numerical vector containing one or more user IDs, ie c(1234, 3456) |
Vector of the user IDs that were successfully notified.
Bill DeVoe, William.DeVoe@maine.gov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
# Get access_token
access_token <- get_iform_access_token(
server_name = "your_server_name",
client_key_name = "your_client_key_name",
client_secret_name = "your_client_secret_name")
# Get a list of all usernames and user IDs in a profile
all_users_info <- retrieve_all_users(
server_name = "your_server_name",
profile_id = 123456,
access_token = access_token)
# Pull out first user_id in the list
user_ids = all_users_info$id
# Send a notification
notified_user_ids <- send_notifications(
server_name = "your_server_name",
profile_id = 123456,
message = "Please sync your device",
users = user_ids,
access_token = access_token)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.