2


I tried with the help of twitter api call into my tcl program, but it's not working. I want to call Xero API into tcl programming using OAuth 1.0a.

::http::register https 443 [list ::tls::socket -ssl2 0 -ssl3 0 -tls1 1]
set handle [::http::geturl https://api.xero.com/api.xro/2.0/Contacts ]
set body [::http::data $handle]

It gives me a following error.

invalid command name "::tls::socket"
while executing
"::http::geturl https://api.xero.com/api.xro/2.0/Contacts "
("uplevel" body line 3)
   invoked from within
 "uplevel {
     ::http::register https 443 [list ::tls::socket -ssl2 0 -ssl3 0 -tls1 1]
fraber
  • 1,204
  • 1
  • 8
  • 21
deepak
  • 23
  • 5
  • 1
    You will have to be more specific. Project Open is based on OpenACS, so you run an OpenACS-based web application and via Twitter, you want to trigger sth in this web application? Make sure you understand how to [formulate a question](https://stackoverflow.com/help/how-to-ask)? Show what you have attempted (code). – mrcalvin Apr 30 '19 at 13:28
  • Hello @mrcalvin, I want to integrate a xero oauth 1.0 an into Tcl programming( I am using OpenACS web-based application. I tried using PHP but I want to do by using Tcl, so how to do that? – deepak Apr 30 '19 at 19:25
  • Hello @mrcalvin, will you help me to build that one? – deepak May 02 '19 at 05:56
  • As I wrote, you will have to show code. For more general directions, the audience at https://openacs.org/forums/forum-view?forum_id=14014 might be of help? – mrcalvin May 07 '19 at 22:31
  • To run `https`, you will need the [TclTLS extension](https://wiki.tcl-lang.org/page/tls) available, generally speaking. The extension provides the `::tls::socket` command. However, as you are working from within OpenACS, you should better use the http machinery that comes with it (incl. the SSL/TLS stack). What is the OpenACS version? Are you running on top of AOLserver or NaviServer? – mrcalvin May 08 '19 at 06:56
  • Also, watch out for previous QA such as https://stackoverflow.com/questions/4606579/problem-requesting-a-https-with-tcl – mrcalvin May 08 '19 at 07:05
  • The separate script is running very well. I am using an OpenACS web-based application i.e. project open ]po[ on windows platform. How to install tls package? Please provide some documentation for that. – deepak May 08 '19 at 08:59

0 Answers0