connecting via api