Are you calling a restlet on the same account? If at all possible, you would be better off loading the restlet script file as a module, then calling the get, post, put, or delete functions directly, passing in a JS object. That only works if your scheduled script and the restlet are both 2.0 or you have a 2.1 and the restlet is 2.0 or 2.1, though. You can avoid the entire authentication issue that way.
If you are calling out to another account, then you'll need a JS module to generate the OAuth 1.0 Authorization header.