connect as api