connect with api