Description Usage Arguments Value See Also
A token is obtained in the last step of the OAuth2.0 authentication process whereby a client ID and secret are exchanged with the authorizing server. This function helps perform this last step of the exchange. LufthansaR API tokens expire after a while so the expiry time is also stored.
To avoid having to type your id and secret into the terminal which might be
saved into a history file, it is recommended that these be stored in a .Renviron
file which is loaded by R before the start of every session. By default, this
function looks for the following string variables in the system environment:
LUFTHANSA_API_CLIENT_ID
a string
LUFTHANSA_API_CLIENT_SECRET
a string
1 2 | get_creds_from_server(client_id = Sys.getenv("LUFTHANSA_API_CLIENT_ID"),
client_secret = Sys.getenv("LUFTHANSA_API_CLIENT_SECRET"))
|
client_id |
The client ID used to register for using the API. |
client_secret |
The secret provided during registration. |
the token information as a list with components token
and expiry
.
Other token handling functions: add_creds_to_cache
,
add_creds_to_env
,
get_creds_from_cache
,
get_creds_from_env
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.