Replace basic authentication with API key.