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(8y 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 1mo ago

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 68% 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

3270d 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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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