I am trying to develop an app to create tasks (specifically using
Entourage). I am working in AppleScript.
When I do an "open location ..." to the api (currently trying to do an
rtm.auth.getFrob), my browser pops open and I see the XML response, it
is successful.
However, when I try to use curl (do shell script "curl ...") I get
back a message from RTM saying the api_key is invalid.
I'm using the exact same request for both calls. I created a
requestTxt variable and use the variable for both calls.
Anyone seen this before?
Thanks
Applescript code snippet:
on getRTMfrob()
set sig to RTMapi_secret
set sig to sig & "api_key" & RTMapi_key
set sig to sig & "methodrtm.auth.getFrob"
do shell script "/sbin/md5 -qs " & sig
set md5sig to result
set requestTxt to "
http://api.rememberthemilk.com/services/rest/?
method=rtm.auth.getFrob"
set requestTxt to requestTxt & "&api_key=" & urlEncode(RTMapi_key)
set requestTxt to requestTxt & "&api_sig=" & urlEncode(md5sig)
--display alert md5sig
--display alert requestTxt
do shell script "curl " & requestTxt
set frobXML to result
display alert frobXML
--set frobXML to open location requestTxt
--set frobXML to result
--display alert frobXML
end getRTMfrob