We have created two example projects for you, which also handle login and cookie handling:

PHP: https://github.com/churchtools/ctapidemo

Node.js: https://github.com/churchtools/ctnodedemo