withings_auth: Authenticate with the Withings API

Description Usage Arguments Value Examples

View source: R/auth.R

Description

This function performs the OAuth dance to get an OAuth2.0 token

Usage

1
2
3
4
5
6
7
withings_auth(
  client_id,
  client_secret,
  scope = c("user.metrics", "user.info", "user.activity"),
  authorize_url = "https://account.withings.com/oauth2_user/authorize2",
  access_url = "https://account.withings.com/oauth2/token"
)

Arguments

client_id

Your client ID

client_secret

Your Client Secret

scope

Which information you would like to access

authorize_url

The authorize URL (you shouldn't need to touch this)

access_url

The access URL (you shouldn't need to touch this)

Value

An access token, or refreshing the access token.

Examples

1
2
3
4
5
6
## Not run: 
client_id <- 12345
client_secret <- "hunter2"
token <- withings_auth(client_id, client_secret)

## End(Not run)

mathesong/rwithings documentation built on Oct. 6, 2021, 11:45 p.m.