# Http\_poller input with basic authentification

**URL:** https://discuss.elastic.co/t/http-poller-input-with-basic-authentification/230811
**Category:** Logstash
**Created:** [May 2, 2020, 2:30pm UTC](https://discuss.elastic.co/t/http-poller-input-with-basic-authentification/230811 "2020-05-02T14:30:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hiba](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiba/32/110919_2.png) [@hiba](https://discuss.elastic.co/u/hiba)
#### Post date: [May 2, 2020, 2:30pm UTC](https://discuss.elastic.co/t/http-poller-input-with-basic-authentification/230811/1 "2020-05-02T14:30:39Z")

</div>

Hi ,  
i can't get data from this api:  
this is my logstash file.conf:  
input {  
http\_poller {  
urls =\> {  
url =\> "XXXXXXXX"  
auth =\> {  
user =\> "bbc"  
password =\> "bbc"  
}  
}  
request\_timeout =\> 60  
schedule =\> { every =\> "60s" }  
codec =\> "json"  
}  
}

output {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "test\_auth"  
}  
stdout { codec =\> rubydebug }  
}

 ![Captureauth](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b4a18f2bad6a6cb28715598f23b3dd234ccd8afb.png)

any help please !

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 2, 2020, 5:48pm UTC](https://discuss.elastic.co/t/http-poller-input-with-basic-authentification/230811/2 "2020-05-02T17:48:59Z")

</div>

> [@hiba](#):
>
> urls =\> {  
> url =\> "XXXXXXXX"  
> auth =\> {  
> user =\> "bbc"  
> password =\> "bbc"  
> }  
> }

The url, user, and password should be in a hash, as shown in the [documentation](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.html#_example).

---

<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 30, 2020, 5:49pm UTC](https://discuss.elastic.co/t/http-poller-input-with-basic-authentification/230811/3 "2020-05-30T17:49:03Z")

</div>

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