made api host and tokens configurable