PHPackages                             danieltrolezi/instagram-sdk - 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. danieltrolezi/instagram-sdk

AbandonedArchivedLibrary[API Development](/categories/api)

danieltrolezi/instagram-sdk
===========================

A simple PHP SDK for Instagram API. Provides a wrapper for making authenticated requests.

2.0.9(9y ago)017.3k1PHPPHP &gt;=5.3.0

Since Jul 22Pushed 8y agoCompare

[ Source](https://github.com/danieltrolezi/instagram-sdk)[ Packagist](https://packagist.org/packages/danieltrolezi/instagram-sdk)[ RSS](/packages/danieltrolezi-instagram-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (9)Used By (0)

Instagram PHP SDK
=================

[](#instagram-php-sdk)

A simple PHP SDK for Instagram API. Provides a wrapper for making authenticated requests.

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

[](#installation)

The easiest way to install is via [Composer](https://getcomposer.org/):

```
composer require danieltrolezi/instagram-sdk: 2.0.*

```

Usage
-----

[](#usage)

To instantiate the class, you simply need to provide an `CLIENT ID` and `CLIENTE SECRET`:

```
$instagram = new Instagram('CLIENT ID', 'CLIENTE SECRET');
```

### Authentication

[](#authentication)

Any API call will require an valid access token. First, you set the same `REDIRECT URI` registered on the [Instagram Developer Portal](https://www.instagram.com/developer/clients/manage/). Then, you can redirect the user to the login URL.

```
$instagram->setRedirectUri('REDIRECT URI');
header('location: ' . $instagram->getLoginURL());
```

Once the user authorizes the application, Instagram will redirect to the `REQUEST URI` with a `code` parameter that can be exchange for an access token:

```
$access_token = $instagram->getAccessToken($_GET['code']);
```

Now you can start make requests to the API. The `getAccessToken` method will automatically set the received access token so you don't need to pass it in every request. If you chose to store the access token and make the request later, you can use the `setAccessToken` method.

### Making requests

[](#making-requests)

To get information about the owner of the access token, all you need to do is:

```
 $user = $instagram->call('users/self');
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~97 days

Recently: every ~135 days

Total

8

Last Release

3316d ago

### Community

Maintainers

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

---

Top Contributors

[![danieltrolezi](https://avatars.githubusercontent.com/u/3670155?v=4)](https://github.com/danieltrolezi "danieltrolezi (23 commits)")

---

Tags

instagraminstagram-apiinstagram-sdkphp-sdkwrapper

### Embed Badge

![Health badge](/badges/danieltrolezi-instagram-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/danieltrolezi-instagram-sdk/health.svg)](https://phpackages.com/packages/danieltrolezi-instagram-sdk)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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