get_token: Get a token to access RTE data API

View source: R/get_token.R

get_tokenR Documentation

Get a token to access RTE data API

Description

Get a token to access RTE data API

Usage

get_token(key, user = NULL, proxy_pwd = NULL)

Arguments

key

a base64 encoded string or a list containing 'client_id' and 'client_secret'. To get those credentials you need an account on https://data.rte-france.com and attach the concerned API to an application.

user

Username for proxy if needeed.

proxy_pwd

Password for proxy if needeed.

Value

a list with the access token

Examples

## Not run: 

# To create a token you can use id_client and id_secret
id_client <- "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
id_secret <- "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
token <- get_token(
  key = list(id_client = id_client, id_secret = id_secret)
)

# or the base64 encoded key
key <- "TGEgZGF0YXNjaWVuY2UgYXZlYyB1biBncmFuZCBS="
token <- get_token(key)


## End(Not run)

dreamRs/rte.data documentation built on Oct. 6, 2022, 6:32 p.m.