PHPackages                             elvanto/api-php - 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. elvanto/api-php

AbandonedArchivedLibrary[API Development](/categories/api)

elvanto/api-php
===============

API PHP Library for Elvanto church management software.

1.0.7(6y ago)61.8k5MITPHPPHP &gt;=5.3.0

Since Nov 23Pushed 6y ago4 watchersCompare

[ Source](https://github.com/elvanto/api-php)[ Packagist](https://packagist.org/packages/elvanto/api-php)[ Docs](https://github.com/elvanto/api-php/)[ RSS](/packages/elvanto-api-php/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Elvanto API PHP Library
=======================

[](#elvanto-api-php-library)

This library is all set to go with version 1 of the [Elvanto API](https://www.elvanto.com/api/).

Authenticating
--------------

[](#authenticating)

The Elvanto API supports authentication using either [OAuth 2](https://www.elvanto.com/api/getting-started/#oauth) or an [API key](https://www.elvanto.com/api/getting-started/#api_key).

### What is This For?

[](#what-is-this-for)

- Quick summary This is an API wrapper to use in conjunction with an Elvanto account. This wrapper can be used by developers to develop programs for their own churches, or to design integrations to share to other churches using OAuth authentication.
- Version 1.0

### Using OAuth 2

[](#using-oauth-2)

This library provides functionality to help you obtain an Access Token and Refresh token. The first thing your application should do is redirect your user to the Elvanto authorization URL where they will have the opportunity to approve your application to access their Elvanto account. You can get this authorization URL by using the `authorize_url()` method, like so:

```
require_once('Elvanto_API.php');

$elvanto = new Elvanto_API();

$authorize_url = $elvanto->authorize_url(
	'Client ID for your application',
  'Redirect URI for your application',
  'The permission level your application requires',
  'Optional state data to be included'
);
// Redirect your users to $authorize_url.
```

If your user approves your application, they will then be redirected to the `redirect_uri` you specified, which will include a `code` parameter, and optionally a `state` parameter in the query string. Your application should implement a handler which can exchange the code passed to it for an access token, using `exchange_token()` like so:

```
require_once('Elvanto_API.php');

$elvanto = new Elvanto_API();

$result = $elvanto->exchange_token(
  'Client ID for your application',
  'Client Secret for your application',
  'Redirect URI for your application',
  'A unique code for your user' // Get the code parameter from the query string.
);

$access_token = $result->access_token;
$expires_in = $result->expires_in;
$refresh_token = $result->refresh_token;
// Save $access_token, $expires_in and $refresh_token.
```

At this point you have an access token and refresh token for your user which you should store somewhere convenient so that your application can look up these values when your user wants to make future Elvanto API calls.

Once you have an access token and refresh token for your user, you can authenticate and make further API calls like so:

```
require_once('Elvanto_API.php');

$auth_details = array(
	'access_token' => 'your access token',
	'refresh_token' => 'your refresh token'
);
$elvanto = new Elvanto_API($auth_details);

$results = $elvanto->call('people/getAll');
var_dump($results);
```

All OAuth tokens have an expiry time, and can be renewed with a corresponding refresh token. If your access token expires when attempting to make an API call, you will receive an error response, so your code should handle this. Here's an example of how you could do this:

```
require_once('Elvanto_API.php');

$auth_details = array(
	'access_token' => 'your access token',
	'refresh_token' => 'your refresh token'
);
$elvanto = new Elvanto_API($auth_details);

$results = $elvanto->call('people/getAll');
if (isset($results->error)) {
	// If you receive '121: Expired OAuth Token', refresh the access token.
	if ($results->error->code == 121) {
		list($new_access_token, $new_expires_in, $new_refresh_token) =
		  $elvanto->refresh_token();
		// Save $new_access_token, $new_expires_in, and $new_refresh_token.
	}
	// Make the call again.
	$results = $elvanto->call('people/getAll');
}
var_dump($results);
```

### Using an API key

[](#using-an-api-key)

```
require_once('Elvanto_API.php');

$auth_details = array('api_key' => 'your API Key');
$elvanto = new Elvanto_API($auth_details);

$results = $elvanto->call('people/getAll');
var_dump($results);
```

To send parameters in your call add an array with your parameters after the endpoint.

For example, to edit an existing members email address:

```
$results = $elvanto->('people/edit', array('id'=>'XXXXXXX', 'fields'=>array('email'=>'new_email@address.com')));
```

Documentation
-------------

[](#documentation)

Documentation can be found on the [Elvanto API website](https://www.elvanto.com/api/).

Updates
-------

[](#updates)

Follow our [Twitter](http://twitter.com/ElvantoAPI) to keep up-to-date with changes in the API.

Support
-------

[](#support)

For bugs with the API PHP Wrapper please use the [Issue Tracker](https://github.com/elvanto/api-php/issues).

For suggestions on the API itself, please [post in the forum](http://support.elvanto.com/support/discussions/forums/1000123316) or contact us [via our website](http://support.elvanto.com/support/tickets/new/).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~1745 days

Total

2

Last Release

2495d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77a936b5c659456479744d404f68ba7bca9552f1d008aa2cf3b8a9175c9ddfb4?d=identicon)[bensinclair](/maintainers/bensinclair)

---

Top Contributors

[![joshmcrae](https://avatars.githubusercontent.com/u/12324115?v=4)](https://github.com/joshmcrae "joshmcrae (2 commits)")[![bensinclair](https://avatars.githubusercontent.com/u/1043658?v=4)](https://github.com/bensinclair "bensinclair (1 commits)")[![philippeaellig](https://avatars.githubusercontent.com/u/2021719?v=4)](https://github.com/philippeaellig "philippeaellig (1 commits)")

---

Tags

apielvanto

### Embed Badge

![Health badge](/badges/elvanto-api-php/health.svg)

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

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22879.8k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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