notion_auth guides the user to retrieving their Notion access token.

notion_auth(return.key = FALSE, cache.dir = default_cache_dir())

Arguments

return.key

A logical value indicating whether to return the auth token without caching it.

cache.dir

A directory path indicating where to cache the auth token.

Value

If return.key is TRUE, it will return the auth token as a character string. Otherwise it will cache the token and return nothing.

Details

You are directed to a web browser, asked to sign in to your Notion account, and to grant notionr permission to operate on your behalf with Notion. By default, these user credentials are cached in a folder below your home directory, ~/.R/notionr/oauth/, from where they can be automatically refreshed, as necessary. Storage at the user level means the same token can be used across multiple projects and tokens are less likely to be synced to the cloud by accident.