Skip to content

Latest commit

 

History

History
1335 lines (912 loc) · 39.7 KB

InstagramApi.md

File metadata and controls

1335 lines (912 loc) · 39.7 KB

Unifapi\Sdk\InstagramApi

All URIs are relative to https://api.unifapi.com, except if the operation defines another base path.

Method HTTP request Description
instagramExploreGet() GET /instagram/explore Browse Instagram's Explore feed
instagramLocationsIdGet() GET /instagram/locations/{id} Get an Instagram location by id
instagramLocationsIdNearbyGet() GET /instagram/locations/{id}/nearby List Instagram locations geographically near a given location
instagramLocationsIdPostsGet() GET /instagram/locations/{id}/posts List posts tagged with an Instagram location
instagramPostsShortcodeCommentsCommentIdRepliesGet() GET /instagram/posts/{shortcode}/comments/{commentId}/replies List replies to an Instagram comment
instagramPostsShortcodeCommentsGet() GET /instagram/posts/{shortcode}/comments List comments on an Instagram post
instagramPostsShortcodeGet() GET /instagram/posts/{shortcode} Get an Instagram post (photo / video / carousel / reel) by shortcode
instagramReelsRecommendedGet() GET /instagram/reels/recommended Browse Instagram's recommended Reels feed
instagramResolveMediaIdGet() GET /instagram/resolve/media-id Convert an Instagram post shortcode into its numeric media_id
instagramResolveShortcodeFromMediaGet() GET /instagram/resolve/shortcode-from-media Convert an Instagram numeric media_id into its shortcode
instagramResolveShortcodeGet() GET /instagram/resolve/shortcode Extract a post shortcode from an Instagram URL
instagramResolveUserIdGet() GET /instagram/resolve/user-id Convert an Instagram username into its numeric user_id (pk)
instagramSearchGet() GET /instagram/search Cross-type Instagram search (posts/reels)
instagramUsersUsernameFollowersGet() GET /instagram/users/{username}/followers List followers of an Instagram user
instagramUsersUsernameFollowingGet() GET /instagram/users/{username}/following List accounts an Instagram user follows
instagramUsersUsernameFormerUsernamesGet() GET /instagram/users/{username}/former-usernames List former usernames for an Instagram user
instagramUsersUsernameGet() GET /instagram/users/{username} Get an Instagram user profile by username
instagramUsersUsernameHighlightsGet() GET /instagram/users/{username}/highlights List Instagram highlight reels for a user (metadata only)
instagramUsersUsernamePostsGet() GET /instagram/users/{username}/posts List feed posts authored by an Instagram user
instagramUsersUsernameReelsGet() GET /instagram/users/{username}/reels List reels authored by an Instagram user
instagramUsersUsernameStoriesGet() GET /instagram/users/{username}/stories List active Instagram stories for a user
instagramUsersUsernameTaggedPostsGet() GET /instagram/users/{username}/tagged-posts List posts an Instagram user is tagged in

instagramExploreGet()

instagramExploreGet($cursor): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

Browse Instagram's Explore feed

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramExploreGet($cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramExploreGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramLocationsIdGet()

instagramLocationsIdGet($id): \Unifapi\\Sdk\Model\InstagramLocationsIdGet200Response

Get an Instagram location by id

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | Numeric Instagram location id.

try {
    $result = $apiInstance->instagramLocationsIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramLocationsIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Numeric Instagram location id.

Return type

\Unifapi\Sdk\Model\InstagramLocationsIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramLocationsIdNearbyGet()

instagramLocationsIdNearbyGet($id): \Unifapi\\Sdk\Model\InstagramLocationsIdNearbyGet200Response

List Instagram locations geographically near a given location

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string

try {
    $result = $apiInstance->instagramLocationsIdNearbyGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramLocationsIdNearbyGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string

Return type

\Unifapi\Sdk\Model\InstagramLocationsIdNearbyGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramLocationsIdPostsGet()

instagramLocationsIdPostsGet($id, $cursor, $tab): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

List posts tagged with an Instagram location

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string
$cursor = 'cursor_example'; // string
$tab = 'tab_example'; // string | Which tab to fetch — `ranked` (top) or `recent` (latest).

try {
    $result = $apiInstance->instagramLocationsIdPostsGet($id, $cursor, $tab);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramLocationsIdPostsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
cursor string [optional]
tab string Which tab to fetch — `ranked` (top) or `recent` (latest). [optional]

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramPostsShortcodeCommentsCommentIdRepliesGet()

instagramPostsShortcodeCommentsCommentIdRepliesGet($shortcode, $comment_id, $cursor): \Unifapi\\Sdk\Model\InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response

List replies to an Instagram comment

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$shortcode = 'shortcode_example'; // string
$comment_id = 'comment_id_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramPostsShortcodeCommentsCommentIdRepliesGet($shortcode, $comment_id, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramPostsShortcodeCommentsCommentIdRepliesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
shortcode string
comment_id string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramPostsShortcodeCommentsGet()

instagramPostsShortcodeCommentsGet($shortcode, $cursor, $sort): \Unifapi\\Sdk\Model\InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response

List comments on an Instagram post

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$shortcode = 'shortcode_example'; // string
$cursor = 'cursor_example'; // string
$sort = 'sort_example'; // string

try {
    $result = $apiInstance->instagramPostsShortcodeCommentsGet($shortcode, $cursor, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramPostsShortcodeCommentsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
shortcode string
cursor string [optional]
sort string [optional]

Return type

\Unifapi\Sdk\Model\InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramPostsShortcodeGet()

instagramPostsShortcodeGet($shortcode): \Unifapi\\Sdk\Model\InstagramPostsShortcodeGet200Response

Get an Instagram post (photo / video / carousel / reel) by shortcode

shortcode is the slug from the post URL, e.g. DUajw4YkorV in instagram.com/p/DUajw4YkorV/.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$shortcode = 'shortcode_example'; // string

try {
    $result = $apiInstance->instagramPostsShortcodeGet($shortcode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramPostsShortcodeGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
shortcode string

Return type

\Unifapi\Sdk\Model\InstagramPostsShortcodeGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramReelsRecommendedGet()

instagramReelsRecommendedGet($cursor): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

Browse Instagram's recommended Reels feed

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramReelsRecommendedGet($cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramReelsRecommendedGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramResolveMediaIdGet()

instagramResolveMediaIdGet($shortcode): \Unifapi\\Sdk\Model\InstagramResolveMediaIdGet200Response

Convert an Instagram post shortcode into its numeric media_id

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$shortcode = 'shortcode_example'; // string

try {
    $result = $apiInstance->instagramResolveMediaIdGet($shortcode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramResolveMediaIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
shortcode string

Return type

\Unifapi\Sdk\Model\InstagramResolveMediaIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramResolveShortcodeFromMediaGet()

instagramResolveShortcodeFromMediaGet($media_id): \Unifapi\\Sdk\Model\InstagramResolveMediaIdGet200Response

Convert an Instagram numeric media_id into its shortcode

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$media_id = 'media_id_example'; // string

try {
    $result = $apiInstance->instagramResolveShortcodeFromMediaGet($media_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramResolveShortcodeFromMediaGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
media_id string

Return type

\Unifapi\Sdk\Model\InstagramResolveMediaIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramResolveShortcodeGet()

instagramResolveShortcodeGet($url): \Unifapi\\Sdk\Model\InstagramResolveShortcodeGet200Response

Extract a post shortcode from an Instagram URL

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$url = 'url_example'; // string

try {
    $result = $apiInstance->instagramResolveShortcodeGet($url);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramResolveShortcodeGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
url string

Return type

\Unifapi\Sdk\Model\InstagramResolveShortcodeGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramResolveUserIdGet()

instagramResolveUserIdGet($username): \Unifapi\\Sdk\Model\InstagramResolveUserIdGet200Response

Convert an Instagram username into its numeric user_id (pk)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string

try {
    $result = $apiInstance->instagramResolveUserIdGet($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramResolveUserIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string

Return type

\Unifapi\Sdk\Model\InstagramResolveUserIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramSearchGet()

instagramSearchGet($q, $cursor): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

Cross-type Instagram search (posts/reels)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string | Search keyword.
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramSearchGet($q, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramSearchGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string Search keyword.
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameFollowersGet()

instagramUsersUsernameFollowersGet($username, $cursor): \Unifapi\\Sdk\Model\InstagramUsersUsernameFollowersGet200Response

List followers of an Instagram user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernameFollowersGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameFollowersGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramUsersUsernameFollowersGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameFollowingGet()

instagramUsersUsernameFollowingGet($username, $cursor): \Unifapi\\Sdk\Model\InstagramUsersUsernameFollowersGet200Response

List accounts an Instagram user follows

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernameFollowingGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameFollowingGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramUsersUsernameFollowersGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameFormerUsernamesGet()

instagramUsersUsernameFormerUsernamesGet($username): \Unifapi\\Sdk\Model\InstagramUsersUsernameFormerUsernamesGet200Response

List former usernames for an Instagram user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernameFormerUsernamesGet($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameFormerUsernamesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string

Return type

\Unifapi\Sdk\Model\InstagramUsersUsernameFormerUsernamesGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameGet()

instagramUsersUsernameGet($username): \Unifapi\\Sdk\Model\InstagramUsersUsernameGet200Response

Get an Instagram user profile by username

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string | Instagram URL slug, e.g. `instagram`

try {
    $result = $apiInstance->instagramUsersUsernameGet($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string Instagram URL slug, e.g. `instagram`

Return type

\Unifapi\Sdk\Model\InstagramUsersUsernameGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameHighlightsGet()

instagramUsersUsernameHighlightsGet($username, $cursor): \Unifapi\\Sdk\Model\InstagramUsersUsernameHighlightsGet200Response

List Instagram highlight reels for a user (metadata only)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernameHighlightsGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameHighlightsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramUsersUsernameHighlightsGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernamePostsGet()

instagramUsersUsernamePostsGet($username, $cursor): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

List feed posts authored by an Instagram user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernamePostsGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernamePostsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameReelsGet()

instagramUsersUsernameReelsGet($username, $cursor): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

List reels authored by an Instagram user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernameReelsGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameReelsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameStoriesGet()

instagramUsersUsernameStoriesGet($username): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

List active Instagram stories for a user

Returns the user's currently-live story tray (empty when the user has no active stories).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernameStoriesGet($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameStoriesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instagramUsersUsernameTaggedPostsGet()

instagramUsersUsernameTaggedPostsGet($username, $cursor): \Unifapi\\Sdk\Model\InstagramExploreGet200Response

List posts an Instagram user is tagged in

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\InstagramApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string
$cursor = 'cursor_example'; // string

try {
    $result = $apiInstance->instagramUsersUsernameTaggedPostsGet($username, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstagramApi->instagramUsersUsernameTaggedPostsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string
cursor string [optional]

Return type

\Unifapi\Sdk\Model\InstagramExploreGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]