authorize_at: Request remote access to user's bridge

Description Usage Arguments Value Examples

View source: R/auth.R

Description

The first step in the remote auth process is to request remote access to the user's bridge. When they click the generated URL, they will be taken to the Hue website where they can grant remote access to your app. Once approved, Hue will redirect them to the callback URL you provided when you registered your app. This redirect URL will include an authorization code as a query parameter. Retain this code.

Usage

1
2
3
4
authorize_at(client_id = Sys.getenv("PHILIPS_HUE_CLIENT_ID"),
  app_id = Sys.getenv("PHILIPS_HUE_APP_ID"),
  bridge_id = Sys.getenv("PHILIPS_HUE_BRIDGE_ID"),
  bridge_name = Sys.getenv("PHILIPS_HUE_BRIDGE_NAME"), state = NULL)

Arguments

client_id

your app's client ID (assigned when you registered your app with Hue)

app_id

your app's ID (the name you registered your app under)

bridge_id

ID of hue bridge you'd like remote access to

bridge_name

name of hue bridge you'd like remote access to

state

arbitrary data that will be included in the redirected response (see Details)

When state = NULL (the default), a random hash will be generated. You can verify this value in the redirected response for an added layer of security.

Value

Returns a URL to request remote access to a user's bridge.

Examples

1
authorize_at('client_id', 'app id', 'bridge_id', 'bridge name')

fascinatingfingers/PhilipsHue documentation built on Nov. 25, 2019, 2:22 a.m.