zotero_credentials: Get Zotero user ID and API key

zotero_credentialsR Documentation

Get Zotero user ID and API key

Description

  • zotero_usr(): Return Zotero user ID

  • zotero_key(): Return Zotero key

  • zotero_user_id(), zotero_group_id(): supply user/group ID to other functions

Usage

zotero_usr()

zotero_key()

zotero_user_id(id)

zotero_group_id(id)

Arguments

id

user or group iD

Details

These functions look for Zotero user ID and Web API key by looking at the following places and returning as soon as a value is found:

  • Options zotero.user and zotero.key respectively

  • Environment variables ZOTERO_USER and ZOTERO_KEY respectively.

Best practice is to store both the user ID and the API key in read-protected ⁠~/.Renviron⁠ as environment variables.

A new API key can be created on this page. The own user ID can be looked up on this page. The group ID is the integer coming after ⁠/groups/⁠ in the respective Zotero URL, e.g. 197065 in case of the URL .../zotero.org/groups/197065/...).

Functions zotero_user_id() and zotero_group_id() are used to supply user or group ID to other functions in the package, primarly zotero_api().

Value

Functions zotero_user_id() and zotero_group_id() return objects of class "zotero_user_id" and "zotero_group_id", both inheriting from class "zotero_id".


mbojan/zoterro documentation built on Oct. 18, 2023, 12:10 p.m.