Always set api key, username and password are optional.