Is idomatic in Ocaml to take configuration and return a module that uses it?

I’ve seen functors used this way. For your particular use case however, wouldn’t it be easier to just create a record for you client:

type client =
  { target_url: string
  ; user: string
  ; pass: string
  }

And then just pass that all at once.