Skip to contents

rsr commands require a user token. To get access to your token:

  1. login to sysrev.com
  2. go to your user page (click icon in upper right)
  3. go to settings
  4. Copy the value following “API Key”

Once you have this token you should save it to the SYSREV_TOKEN environmental variable:

Sys.setenv(SYSREV_TOKEN='enter your value')

You can also set the SYSREV_TOKEN environmental variable outside of your code.

Please remember to never share your token and don’t put your token anywhere in code that you share.

To check that your token is working, try the below code:

rsr::get_answers(3144)
## # A tibble: 3,267 × 12
##        aid title    lid   user_id confi…¹ resolve short…² value…³ answer resol…⁴
##      <int> <chr>    <chr>   <int> <chr>   <lgl>   <chr>   <chr>   <chr>  <chr>  
##  1 1522571 Genetic… 1b3b…     162 2018-0… FALSE   Include boolean "true" NA     
##  2 1522571 Genetic… 1b3b…     153 2018-1… FALSE   Include boolean "true" NA     
##  3 1522571 Genetic… e1a7…     162 NA      FALSE   Annota… annota… "{\"a… NA     
##  4 1522571 Genetic… e1a7…     153 NA      FALSE   Annota… annota… "{\"a… NA     
##  5 1523073 Stabili… 1b3b…     163 2018-0… FALSE   Include boolean "true" NA     
##  6 1523073 Stabili… e1a7…     163 NA      FALSE   Annota… annota… "{\"a… NA     
##  7 1522624 Highly … 1b3b…     184 2018-0… FALSE   Include boolean "fals… NA     
##  8 1522716 NeuroD … 1b3b…     174 2018-0… FALSE   Include boolean "fals… NA     
##  9 1522596 Genome-… 1b3b…     163 2018-0… FALSE   Include boolean "true" NA     
## 10 1522596 Genome-… e1a7…     163 NA      FALSE   Annota… annota… "{\"a… NA     
## # … with 3,257 more rows, 2 more variables: opts <list>, pid <dbl>, and
## #   abbreviated variable names ¹​confirm_time, ²​short_label, ³​value_type,
## #   ⁴​resolve_time