PHPackages                             vineyardkoeln/churchtools-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. vineyardkoeln/churchtools-api

Abandoned → [5pm-HDH/churchtools-api](/?search=5pm-HDH%2Fchurchtools-api)ArchivedLibrary[API Development](/categories/api)

vineyardkoeln/churchtools-api
=============================

Object-oriented API access to ChurchTools

0.5.99(2y ago)132208Apache-2.0PHPPHP ^8.1

Since Feb 10Pushed 2y ago2 watchersCompare

[ Source](https://github.com/vineyardkoeln/churchtools-api)[ Packagist](https://packagist.org/packages/vineyardkoeln/churchtools-api)[ Docs](https://github.com/vineyardkoeln/churchtools-api)[ RSS](/packages/vineyardkoeln-churchtools-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (15)Used By (0)

No longer maintained. Please move to !
==================================================================================

[](#no-longer-maintained-please-move-to-httpsgithubcom5pm-hdhchurchtools-api)

ChurchTools API
===============

[](#churchtools-api)

Access the API for [ChurchTools](https://church.tools/) at  in an object-oriented way that integrates nicely with modern PHP projects via Composer.

The API v2 which uses the new (2019) REST api can be found in the [README\_API2.md](README_API2.md).

Free software (both as in free beer *and* free speech) by [Vineyard Köln](https://vineyard.koeln/), licensed under Apache 2.0

\[4\]:

Further development
-------------------

[](#further-development)

Currently this library has not been updated recently. If you wish to participate in development, you can send us pull requests to integrate in the main branch

Other php CT API implementations
--------------------------------

[](#other-php-ct-api-implementations)

Installation
------------

[](#installation)

`composer require vineyardkoeln/churchtools-api`

Usage
-----

[](#usage)

### Prerequisite: Autoloading

[](#prerequisite-autoloading)

If you haven't already configured autoloading in your project, start by including the Composer autoloader:

```
require __DIR__ . '/vendor/autoload.php';

```

### Login to use the API

[](#login-to-use-the-api)

In order to use the ChurchTools API you need a valid login. This can either be a username / password pair or you can use a login ID and token. The latter is the recommended way because it keeps you API separate from any user account but username and password is fine for testing purposes.

To login with username and password, use this code snippet:

```
$api = \ChurchTools\Api\RestApi::createWithUsernamePassword('mychurch', 'username', 'password');

```

where `mychurch` is your church handle or subdomain like in the URL to your web interface: https://*mychurch*.church.tools/. If you are self-hosting ChurchTools, then use full server name of your installation without protocol (so for example: `'mychurch.example.org'`).

To login with a login ID and token, use this code snippet (recommended):

```
$api = \ChurchTools\Api\RestApi::createWithLoginIdToken('mychurch', 1337, 'a really long seemingly random string of 256 alphanumeric characters');

```

You can retrieve the token by logging in once to the API with a username and password via the static method `getLoginToken()` (see below).

The login is valid for the duration of the programm call (script lifecycle). This way you can perform many requests with only one login via the static constructor method of your choice.

The following examples mostly assume you have a valid login and the API object is assigned to the variable `$api`.

### Get Token

[](#get-token)

In order to acquire a login ID and token you must call the `getLoginToken` method once:

```
$result = \ChurchTools\Api\RestApi::getLoginToken($churchHandle, $usernameOrEmail, $pass);
var_dump($result);

```

This will return something like:

```
array(2) {
  ["status"]=>
  string(7) "success"
  ["data"]=>
  array(2) {
    ["token"]=>
    string(256) "this is the very long string of seemingly random 256 alphanumberic characters that you need to store"
    ["id"]=>
    string(4) "1337"
  }
}

```

### Get all calendar entries

[](#get-all-calendar-entries)

To get all calendar entries from now until 10 days in the future:

```
$events = $api->getCalendarEvents([1,2,…]);

foreach ($events['data'] as $event) {
    // …
}

```

This method also has two optional parameters, `$toDays` and `$fromDays`, which allow you to select the desired timeframe.

### Get master data

[](#get-master-data)

To get calendar or service master data, use this method:

```
var_dump($api->getCalendarMasterData());

```

or

```
var_dump($api->getServiceMasterData());

```

TODO: In one of the upcoming alpha versions, methods will return model objects and not plain arrays.

TODOs
-----

[](#todos)

1. Wrap more API calls
2. Use Model classes for the return data instead of plain arrays
3. Someday, wrap all available API calls
4. Document every single available method

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 65.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~172 days

Recently: every ~398 days

Total

14

Last Release

769d ago

PHP version history (3 changes)v0.0.1PHP &gt;=7.0.9

v0.4.0PHP &gt;=7.1

0.5.3PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/479d032ef76dc640151da1c7f6d400e2f209c64999e4f8cd2be24915c7d010fc?d=identicon)[vineyardkoeln](/maintainers/vineyardkoeln)

---

Top Contributors

[![a-schild](https://avatars.githubusercontent.com/u/1441009?v=4)](https://github.com/a-schild "a-schild (45 commits)")[![YetiCGN](https://avatars.githubusercontent.com/u/447119?v=4)](https://github.com/YetiCGN "YetiCGN (20 commits)")[![alexanderkraemer](https://avatars.githubusercontent.com/u/6594774?v=4)](https://github.com/alexanderkraemer "alexanderkraemer (3 commits)")[![JochenKalmbach](https://avatars.githubusercontent.com/u/10469087?v=4)](https://github.com/JochenKalmbach "JochenKalmbach (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/vineyardkoeln-churchtools-api/health.svg)

```
[![Health](https://phpackages.com/badges/vineyardkoeln-churchtools-api/health.svg)](https://phpackages.com/packages/vineyardkoeln-churchtools-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[googleads/googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP

67410.3M25](/packages/googleads-googleads-php-lib)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
