Http polar authentication

I am using http polar to parse a json API with authentication required at the beginning.
Its showing an error that the URL is incorrect. And when I am checking my config file using --configtest, its showing the conf file is OK.
Where am I going wrong?
Following is my code:

> input 
> {
>                 http_poller {
>                                 urls => {
>                                 test1 => "http://json-url-example"
>                                                 auth => {
>                                                 user => "user"
>                                                 password => "password"
>                                                 }

>                                                 }

>                 interval => 10830
>                 codec => "json"
>                                 }
> }

Its showing an error that the URL is incorrect.

Seeing the exact error message would've been useful.

Your configuration is indeed not correct. It needs to be like this:

http_poller {
  urls => {
    test1 => {
      url => "http://json-url-example"
      auth => {
        user => "user"
        password => "password"
      }
    }
  }
  interval => 10830
  codec => "json"
}

Indenting the configuration properly makes mistakes like this easier to spot.

@magnusbaeck Thanks Magnus!