# Http\_poller authentication problem

**URL:** https://discuss.elastic.co/t/http-poller-authentication-problem/83930
**Category:** Logstash
**Created:** [April 27, 2017, 7:00pm UTC](https://discuss.elastic.co/t/http-poller-authentication-problem/83930 "2017-04-27T19:00:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Fan\_Dong](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@Fan\_Dong](https://discuss.elastic.co/u/Fan_Dong)
#### Post date: [April 27, 2017, 7:00pm UTC](https://discuss.elastic.co/t/http-poller-authentication-problem/83930/1 "2017-04-27T19:00:23Z")

</div>

- Logstash 5.1
- Problem: I cannot seem to get http\_poller authentication working. For example I can use curl -u user:pass my\_rest\_api to get the output but the same always fail with the following logstash conf. The error is HTTP 401 - 'this request requires http authentication'.

Any insight of why?

```
input {
  http_poller {
    urls => {
      experiments => { 
        method => "get"
      	url => "my_rest_api" 
      	auth => {
      		user => "user"
      		password => "pass"
      	}
      }
    }
    request_timeout => 10
    interval => 3600
    codec => "plain"
  }
}
```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 25, 2017, 7:14pm UTC](https://discuss.elastic.co/t/http-poller-authentication-problem/83930/2 "2017-05-25T19:14:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
