question

Upvotes
Accepted
1 0 0 3

Has anyone used calais tagging in R?

h = c("X-AG-Access-Token" = key , "Content-Type" = "text/raw" , "outputformat" = "application/json; charset=utf-8") b<-list(body=upload_file("test.txt"))

POST(url=api ,add_headers(.headers=h) ,accept_json() ,encode = "multipart" ,body=text ,verbose())

I've been working with this code for a few days and would greatly appreciate any help!

intelligent-tagging-apiauthenticationrintelligent-taggingopen-calais-apisemantic-metadata-taggingtokenpost
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
21 0 0 0

Tag API doesn't support "multipart". I would start with something like this:

POST(url="<<url>>", add_headers(.headers=c("Content-Type"="text/raw", "X-AG-Access-Token"="<<key>>")), accept_json(), verbose(), body="<<some-text-to-tag>>")
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea