Connect to the api