PHPackages                             orbital-flight/craft-celigo - 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. orbital-flight/craft-celigo

ActiveCraft-plugin[API Development](/categories/api)

orbital-flight/craft-celigo
===========================

Connect to a custom Celigo My API endpoint.

1.1.2(2y ago)01proprietaryPHPPHP &gt;=8.0.2

Since Sep 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/orbital-flight/craft-celigo)[ Packagist](https://packagist.org/packages/orbital-flight/craft-celigo)[ RSS](/packages/orbital-flight-craft-celigo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Celigo
======

[](#celigo)

Use this plugin to connect Craft to any custom Celigo « My API » endpoint using a controller or the Twig variable.

Setting up your endpoints
-------------------------

[](#setting-up-your-endpoints)

You will first need to configure your custom My API celigo endpoints (and their scripts/configurations) [on Celigo](https://docs.celigo.com/hc/en-us/sections/360009934891-Build-your-API).

Once you have your API ID and token, head to the plugin settings and add them to the table.

You will need to choose a handle to refer to each API in your code.

As an extra safety measure, you can use environment variables for your credentials.

Basic usage
-----------

[](#basic-usage)

Once your endpoints are configured, you can build your requests by calling the appropriate controller or directly from your twig templates using the plugin's variable.

You will need the HTTP method which you want to call your API\* with, the custom endpoint you created on the previous step, and optionally the parameters you want to pass to the API.

\**Available HTTP methods: GET - POST - PUT - UPDATE - DELETE - PATCH*

### Twig variable:

[](#twig-variable)

```
{% set response = craft.celigo.get('my-custom-handle') %}
```

```
{% set response = craft.celigo.post('my-custom-handle', {
    param1: "value1",
    param2: "value2",
    param3: [
        subParam1: "value3",
        subParam2: "value4"
    ]
}) %}
```

Your API’s response will be converted from JSON to a twig object.

Let's say your API returns this JSON response:

```
{
    "weather": {
        "id": 420,
        "main": "Rain",
        "description": "moderate rain"
    }
}
```

You'll be able to output `moderate rain` using `response.weather.description`

### Controller:

[](#controller)

You can also call your APIs using the plugin's controllers by calling `celigo/call/[HTTP_METHOD]`.

The required parameter `handle` is a string calling your API handle.

If you are calling the controller via an HTML form, the response will be sent as a twig object `'response'` working similarly to the twig variable described above.

Use the `params` parameter as needed to pass additional parameters as an array.

Finally, you can also pass a `redirect` parameter with the template (handle or path) you want the response to be available in (this param is optional. Without it, the controller will load the response in the template from which the request has been made).

#### Example:

[](#example)

```

    {{ csrfInput }}
    {{ actionInput('celigo/call/get') }}
    {{ redirectInput('my-template') }}
    {{ hiddenInput('handle', 'my-handle') }}
    {{ hiddenInput('params[user][id]', '42') }}
    {{ hiddenInput('params[user][email]', 'email@example.com') }}
    {{ hiddenInput('params[groups][0][id]', '528491') }}

```

The above example will make a `GET` request to the `my-handle` API, passing the following parameters:

```
{
    "user": {
        "id": "42",
        "email": "email@example.com"
    },
    "groups": [
        {
            "id": "528491"
        }
    ]
}
```

#### AJAX:

[](#ajax)

If you are calling the controller with an AJAX request, the response will be provided as JSON. Make sure to follow the [usual Craft convention to call controllers with AJAX](https://craftcms.com/docs/4.x/dev/controller-actions.html#ajax), such as accepting JSON and be properly formatted with a CSRF token.

```
const postData = {
    handle: "my-handle",
    params: {
        "user": {
            "id": "42",
            "email": "email@example.com"
        },
        "groups": [
            {
                "id": "528491"
            }
        ]
    }
};

getSessionInfo().then((session) => {
    fetch("/actions/celigo/call/get", {
        method: "POST",
        headers: {
            Accept: "application/json",
            "Content-Type": "application/json",
            "X-CSRF-Token": session.csrfTokenValue,
            "X-Requested-With": "XMLHttpRequest",
        },
        body: JSON.stringify(postData),
    })
    .then((response) => response.json())
    .then((result) => console.log(result));
});
```

Troubleshooting
---------------

[](#troubleshooting)

You can listen for errors by checking the `error` property `{{ response.error }}`, which provides a friendly, comprehensive explanation of what's going on.

For error 4XX and 5XX, two dumpables objects are generated to help you troubleshoot ;

- The `errorBody` property will contain the main error message and code ;

```
{{ response.errorBody.message ?? "" }}
{{ response.errorBody.code ?? "" }}
```

- The `debugError` property will contain the full API’s response data as an object you can dump:

```
{% if response.error is defined %}
    {{ dump(response.errorDebug) }}
{% endif %}
```

For early development, you can just dump any of your response with:

```
{% if response is defined %}
    {{ dump(response) }}
{% endif %}
```

*AJAX troubleshooting basically works the same but with a JSON response.*

Disclaimer
----------

[](#disclaimer)

This plugin mostly acts like an API bridge between your Craft project and any existing Celigo MyAPI endpoints. However, and because Celigo’s solution is very complete, sensible data can easily be obtained and dealed with. Keep in mind that you are responsible for your script's behaviours and for the usage or display of the data you can manipulate with this plugin.

Orbital-flight is not linked to Celigo ;-)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.3.5 or later, and PHP 8.0.2 or later.

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

[](#installation)

You can install this plugin from the Plugin Store or with Composer.

#### From the Plugin Store

[](#from-the-plugin-store)

Go to the Plugin Store in your project’s Control Panel and search for “Celigo”. Then press “Install”.

#### With Composer

[](#with-composer)

Open your terminal and run the following commands:

```
# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require orbital-flight/craft-celigo

# tell Craft to install the plugin
./craft plugin/install celigo
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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 ~24 days

Total

4

Last Release

890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a61c2f32845b50a601b45a3aed66b924dd13c85725866bcba86b9587187a2ffc?d=identicon)[mvanbeselaere](/maintainers/mvanbeselaere)

### Embed Badge

![Health badge](/badges/orbital-flight-craft-celigo/health.svg)

```
[![Health](https://phpackages.com/badges/orbital-flight-craft-celigo/health.svg)](https://phpackages.com/packages/orbital-flight-craft-celigo)
```

###  Alternatives

[craftcms/element-api

Create a JSON API for your elements in Craft

503701.3k8](/packages/craftcms-element-api)[markhuot/craftql

A GraphQL implementation for Craft

31844.7k](/packages/markhuot-craftql)[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36205.0k3](/packages/wrav-oembed)[craftcms/apple-news

Publish Craft CMS entries to Apple News

4223.5k](/packages/craftcms-apple-news)[imarc/craft-googlecustomsearch

A Craft plugin for integrating with Google's Custom Search (and Google's Site Search.)

2312.3k](/packages/imarc-craft-googlecustomsearch)[scaramangagency/craftagram

Grab Instagram content through the Instagram API

1426.0k](/packages/scaramangagency-craftagram)

PHPackages © 2026

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