RCROSSREF API ERROR: res$response_headers$`content-type` == "application/json;charset=UTF-8" is not TRUE

Viewed 774

CODE:

cr_journals(issn=c('1803-2427','2326-4225'))

RESULTS:

Error in cr_GET(endpoint = path, args, todf = FALSE, parse = TRUE, ...) : 
  res$response_headers$`content-type` == "application/json;charset=UTF-8" is not TRUE

Somehow the RCROSSREF API does not work suddenly and returns an error message as above for a simple query, it worked well before and now i think might be that i exceed the limit or something is happening in the API side.

Does anyone have an idea of how to solve such problem?

1 Answers

You have to register for the polite pool (see issue on GitHub):

  1. Open file: file.edit("~/.Renviron")
  2. Add email address to be shared with Crossref crossref_email= "name@example.com"
  3. Save the file and restart your R session

Source

Related