Skip to contents

This is the second step. It initiates the 3-legged OAuth 2.0 flow. It will open your web browser, ask you to log in to LinkedIn and authorize the application scopes. After authorization, it automatically fetches and caches an access token for future use.

Usage

li_auth(scope = "openid profile", cache = TRUE, new_user = FALSE)

Arguments

scope

A space-delimited string of permissions your application is requesting. Per new OpenID Connect docs, this defaults to "openid profile".

cache

Logical or a string. TRUE caches the token in a file named .httr-oauth in the current working directory. Caching is highly recommended.

new_user

Logical. Set to TRUE to force a new authentication, even if a cached token exists.

Value

A Token2.0 object, which is automatically cached.

Examples

if (FALSE) { # \dontrun{
# After configuring, run this to authenticate. Your browser will open.
li_token <- li_auth()
} # }