Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Troubles with API Key for the NCBO Annotator

Scott Keating sjk3001 at med.cornell.edu
Wed Mar 15 07:16:09 PDT 2017


Hello,

My name is Scott Keating, and I am a research aide at Weill Cornell Medical College in New York City. I am emailing you today because I am receiving a strange error in running some code for the NCBO annotator that I am hoping you might be able to help with. After running the following code in the "R" programming language, the following error occurs: "Error: Unauthorized". If anyone happens on your end happens to know what my problem might be, I would greatly appreciate their input. I have entered both my unique API key, and also the simple work "apikey" to no avail. I have emailed you all before and you were very helpful. Thank you for your hard work! The following is my R code:

library(bitops)
library(RCurl)
url <- "http://data.bioontology.org/annotator"
cat(url,"\n")
text <- readLines("C:/Users/SJK3001/Desktop/text.txt")
apikey <- "fbcd9b23-1a86-4e1d-9af2-ac417482bdef"

for (sentence_id in 1:length(text)) {
  current_sentence <-
    as.character(text[sentence_id]) # current sentence to process
  cat("#", sentence_id, "from", length(text),
      ":", current_sentence, "\n")
result <- postForm(url,
                   "text"=current_sentence,
                   "apikey"=apikey,
                   "ontologies"={"DDO"},
                   "exact_match"="false",
                   #"include" = "all"
                   "mappings"= "all",
                   "whole_word_only"="false",
                   "format"="xml")
}

Again, I think the problem has something to do with the API key based on the error. Thank you for your help!

Best,
Scott Keating
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20170315/2a97a3e6/attachment-0001.html>


More information about the bioontology-support mailing list