get_token: Extract API token from OneMap.Sg

View source: R/get_token.R

get_tokenR Documentation

Extract API token from OneMap.Sg

Description

This function is a wrapper for the OneMap Authentication Service API. It allows users to generate a API token from OneMap.Sg. Using the API requires that users have a registered email address with Onemap.Sg. Users can register themselves using OneMap.Sg's form.

Usage

get_token(email, password, hide_message = FALSE)

Arguments

email

User's registered email address.

password

User's password.

hide_message

Default = FALSE. Whether to hide message telling user when the token expires.

Value

API token, or NULL if an error occurs. If error occurs, a warning message will be printed with the error code.

Examples

## Not run: get_token("user@example.com",  "password")

onemapsgapi documentation built on Nov. 29, 2022, 9:06 a.m.