Update connect_to_api.R