huginn / huginn

Create agents that monitor and act on your behalf. Your agents are standing by!
MIT License
42.89k stars 3.74k forks source link

help how to use javascript in credentials #1136

Closed bassodyssey closed 8 years ago

bassodyssey commented 8 years ago

Hello,

Love huginn but I have an issue, I'm sure it is not that difficult but i'm no dev and cannot find an example how to use javascript in credentials page.

I want to use the API of my internet provider router (http://dev.freebox.fr/sdk/os/login/) but I need to login and to do so I need to compute something with CryptoJS, I don't understand everything but I think I can figure it out if only I can get an example on how to use Javascript to get that token and return the value to a Post agent.

Please can someone help me or provide me an example, thanks guys.

cantino commented 8 years ago

Hey @bassodyssey! I think this will be difficult with Huginn because we don't run a full JavaScript environment in the WebsiteAgent. You'd need something like phantomjs or selenium, I think.

bassodyssey commented 8 years ago

Thanks for your answer @cantino. I tried many things and I find out that the API of my router doesn't allow cross domain, so I would be stuck anyway unless using some proxy. Finally I found a very simple way to achieve what I wanted to do using Data Output Agent as my router can read RSS. My brain need some resting now :sleeping:

cantino commented 8 years ago

I'm glad you figured out a simple solution :)

Should we close this issue?

bassodyssey commented 8 years ago

Yes we do, thanks.