{"repo":"churchtools/churchtools-js-client","free":true,"listed":false,"github":"https://github.com/churchtools/churchtools-js-client","clone":"git clone https://github.com/churchtools/churchtools-js-client.git","description":"JavaScript client to easily access the ChurchTools REST-API","language":"TypeScript","stars":27,"topics":["javascript","js","churchtools","api","api-client"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"churchtools-js-client churchtools-js-client is a client written in JavaScript to easily access the ChurchTools REST API. Its main benefits include: - Easy to use abstraction of the login process which handles session cookies and automatically performs a re-login if the session expired (using the login token provided). - Supports both, the old and the new version of the ChurchTools API. - Automatically requests and handles the submission of CSRF tokens for the old API. - Can be used in a web application running in a browser or on server-side in a Node.js application. Installation Please use npm to install this package in your application: If your target application is a Node.js application, you will also need to install the packages axios-cookiejar-support and tough-cookie . They are not required when targeting a web browser. CORS Header Configuration If you intend to connect to a ChurchTools system from an application running in a web browser, any request to the ChurchTools system is effectively a cross origin request. As a security concept the browser will block these requests by default. However, the CORS mechanism can be used to allow the respective requests. This requires setting CORS headers on the server side: In your ChurchTools system go to the system settings Integrations Cross-Origin Resource Sharing and add a new entry to the Access Control Allow Origin list. For development that will be something like http:/localhost:5173 . If your app is running on another web se","default_branch":null,"files":null,"tree":[],"storefront":"/r/churchtools","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/churchtools/churchtools-js-client/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}