This package is abandoned and no longer maintained. No replacement package was suggested.

Kirby 3 Plugin to call Instagram API Endpoints

Fund package maintenance!

Installs: 347

Dependents: 0

Suggesters: 0

Security: 0

Stars: 16

Watchers: 0

Forks: 1

Open Issues: 1


1.2.0 2019-08-26 10:20 UTC

This package is auto-updated.

Last update: 2020-03-28 19:13:47 UTC


Release Stars Downloads Issues Build Status Coverage Status Maintainability Demo Gitter Twitter

Kirby 3 Plugin to call Instagram (or any other) API Endpoints

  1. Instagram
  2. Any API

Commercial Usage

This plugin is free but if you use it in a commercial project please consider to


  • unzip as folder site/plugins/kirby3-instagram or
  • git submodule add site/plugins/kirby3-instagram or
  • composer require bnomei/kirby3-instagram


You can set the token in the config.


return [
    // other config settings ...
    'bnomei.instagram.token' => 'YOUR-TOKEN-HERE',

You can also set a callback if you use the dotenv Plugin.


return [
    // other config settings ...
    'bnomei.instagram.token' => function() { return env('INSTAGRAM_TOKEN'); },




    // default. this will cause loading from the config file or set it here...
    $token = null; 
    $token = 'YOUR-TOKEN-HERE';
    $endpoint = 'users/self/media/recent';
    $params = [
        'count' => 4
    $force = null; // default. this will cause refresh on global debug == true
    // $force = true; // always force refresh
    foreach(site()->instagram($token, $endpoint, $params, $force) as $data) {
        echo Kirby\Toolkit\Html::img(

TIP: all site()->instagram() function parameters are optional if their value is set in config.


Since you can configure the api-url, endpoint and json-root data element you could actually query any API you want not just Instagram.

$inst = new Bnomei\Instagram([
    'token' => null,
    'api' => '',
    'endpoint' => 'p/bnomei/kirby3-instagram.json',
    'json-root' => 'packages',
$data = $inst->api()['bnomei/kirby3-instagram']['1.2.0']['authors'][0]['name'];
// Bruno Meilick

TIP: since the params can be a callback you can forward any data you want and again even from an .env file. Go wild!


This plugin does have a cache unless global debug options is set or your $force the refresh because the instagram api will stop working if you push to may requests in a short period of time.


bnomei.instagram. Default Description
expire 60*24 in minutes. 0 will never expire (aka forever).
token null you could add a default token
endpoint users/self/media/recent you could change default endpoint
params [] you could change default params for api
json-root data node to unwrap in json response

TIP: All setting params could be callbacks. Example see Setup with DotEnv.


This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.



It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.