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 512.0 KiB each and 1.0 MiB total.

Contacted Eran Strauchler to verify this question.

@jholmes

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,
AHS

@jholmes

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

1 Answer

· Write an 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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