Huginn Resources

Website Agent Auth

Handling authentication with Website Agent #1497 - The general idea is:

  1. POST request to https://www.website.com/login with username / password in the payload
  2. Retrieve the cookies set in the response headers of the call
  3. Send a GET request to https://www.website.com/whatever (endpoint behind auth) using the cookies - Website Agent options:
{
  "expected_update_period_in_days": "2",
  "url": "http://xkcd.com",
  "type": "html",
  "mode": "on_change",
  "extract": {},
  "headers": {
    "Cookie": "{{ headers.Set-Cookie }}"
  }
}

# Or use headers['Set-Cookie'] 
# instead of dot notation? No one knows.

In Actual Use

Huginn for Newsrooms

More about how the NYT uses Huginn.

Example Scenario

Huginn Agent Scenario: Ironmonger - Ironmonger is a network of agents which watches the stock prices of the 20 biggest defense contractors in the United States and alerts if their stock prices jump by more than three (3) standard deviations, meaning that one or more has just won a big contract and something’s coming. Send an e-mail if something happens.

Huginn 
Huginn