GetEmailToken: Retrieve ODK Central API Token

Description Usage Arguments Details Value Examples

View source: R/ConnectToCentral.R

Description

To connect to ODK Central users must retrieve a token. To use this function, you will need: 1. An ODK Central server (Here are instructions to set up ODK Central: https://docs.getodk.org/central-setup/) 2. An account on the server (you will have to register with an email and a password)

Usage

1
GetEmailToken(central_url, central_email, central_password)

Arguments

central_url

The url which pounts to an ODK Central sever

central_email

The email linked to your odk central account

central_password

The password used for your central account

Details

In order to keep your credential safe, it is recommended that you save your username and password as "environment variables".

Value

This function will return a token. This token is useful for

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
my_central_url <- "https://myrandomurl.com"
my_central_email <- Sys.getenv("odk_username")
my_central_password <- Sys.getenv("odk_password")

token<-GetEmailToken(central_url=my_central_url,
                     central_email = my_central_email,
                     central_password = my_central_password)

## End(Not run)

l-gorman/ConnectToCentral documentation built on June 13, 2020, 12:24 a.m.