Skip to main content

Instagram API allows developers to integrate Instagram’s core features like user profiles, photos, videos, and basic interactions into apps and services.

Project description

Getting Started with Instagram API

Introduction

Description of Instagram RESTful API.

Current limitations:

Warning: For Apps created on or after Nov 17, 2015 API responses containing media objects no longer return the data field in comments and likes nodes.

Last update: 2015-11-28

Instagram Developer Documentation: https://instagram.com/developer

Install the Package

The package is compatible with Python versions 3.7+. Install the package from PyPi using the following pip command:

pip install sdk-instagram==1.0.0

You can also view the package at: https://pypi.python.org/pypi/sdk-instagram/1.0.0

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

Parameter Type Description
environment Environment The API environment.
Default: Environment.PRODUCTION
http_client_instance HttpClient The Http Client passed from the sdk user for making requests
override_http_client_configuration bool The value which determines to override properties of the passed Http Client from the sdk user
http_call_back HttpCallBack The callback value that is invoked before and after an HTTP call is made to an endpoint
timeout float The value to use for connection timeout.
Default: 60
max_retries int The number of times to retry an endpoint call if it fails.
Default: 0
backoff_factor float A backoff factor to apply between attempts after the second try.
Default: 2
retry_statuses Array of int The http statuses on which retry is to be done.
Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]
retry_methods Array of string The http methods on which retry is to be done.
Default: ['GET', 'PUT']
api_key_credentials ApiKeyCredentials The credential object for Custom Query Parameter
instagram_auth_credentials InstagramAuthCredentials The credential object for OAuth 2 Implicit Grant

The API client can be initialized as follows:

from instagramapi.configuration import Environment
from instagramapi.http.auth.api_key import ApiKeyCredentials
from instagramapi.http.auth.instagram_auth import InstagramAuthCredentials
from instagramapi.instagramapi_client import InstagramapiClient
from instagramapi.models.o_auth_scope_instagram_auth_enum import OAuthScopeInstagramAuthEnum

client = InstagramapiClient(
    api_key_credentials=ApiKeyCredentials(
        access_token='access_token'
    ),
    instagram_auth_credentials=InstagramAuthCredentials(
        o_auth_client_id='OAuthClientId',
        o_auth_redirect_uri='OAuthRedirectUri',
        o_auth_scopes=[
            OAuthScopeInstagramAuthEnum.BASIC,
            OAuthScopeInstagramAuthEnum.COMMENTS
        ]
    ),
    environment=Environment.PRODUCTION
)

Authorization

This API uses the following authentication schemes.

List of APIs

SDK Infrastructure

HTTP

Utilities

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdk_instagram-1.0.0.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdk_instagram-1.0.0-py3-none-any.whl (77.2 kB view details)

Uploaded Python 3

File details

Details for the file sdk_instagram-1.0.0.tar.gz.

File metadata

  • Download URL: sdk_instagram-1.0.0.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for sdk_instagram-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d7fbba766d68a6e274b25313c50d65b6697c7b73eb670b747ac5d1c0cefe45f4
MD5 fc548e5f6d81bf8a4103c696b91df6a0
BLAKE2b-256 8db2769029b1bd224fcf8e66b6cf060dc4d7d61fb8894817dee75fbf0e46e0d8

See more details on using hashes here.

File details

Details for the file sdk_instagram-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sdk_instagram-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 77.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for sdk_instagram-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d08e7478cc29ab780431da9c7233b463a45d101e56ef51f7ab730cdcd8c9aea9
MD5 a77f9fe6e81638d9bd502ae22ea61d4a
BLAKE2b-256 a9a2909769cc1d052f8e8dfeb5e57feeb05516703cd57293e303b038a505a50c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page