How to set up input for https curl and header key?

Going back to domain name instead of IP address didn't throw any errors but just sat there. I removed the port after the domain name which caused 'could not read from stream : Read time out
' error. Then, I tried

input {
  http_poller {
    urls => {
	  rv_url => {
        method => get
		  url => "https://feed.source.com:443/1.0/json/A9575EEEE9F44635332E9928FD237049/server-status?auto"
		  headers => { 
		    api_key => "zBA7goakSWiEY19w1A7aHA" 
			}
		}
	}
#	request_timeout => 60
	schedule => { cron => "* * * * * UTC"}
	codec => "json"
#	metadata_target => "http_poller_metadata"
  }
}
output {
  stdout {
    codec => rubydebug
  }
}

from: https://www.elastic.co/blog/introducing-logstash-http-poller, which gave me this error:

{
      "@version"←[0;37m => ←[0m←[0;33m"1"←[0m,
    "@timestamp"←[0;37m => ←[0m2018-07-31T20:56:00.240Z,
       "message"←[0;37m => ←[0m←[0;33m"<head><title>Not authorized</title></head>"←[0m,
          "tags"←[0;37m => ←[0m[
        ←[1;37m[0] ←[0m←[0;33m"_jsonparsefailure"←[0m
    ]
}

What can I try now?