instagram-python is an API wrapper for Instagram written in Python
pip install instagram-python-lib
from instagram.client import Client
client = Client('CLIENT_ID', 'CLIENT_SECRET')
Get authorization url
scopes = ['basic']
url = client.authorization_url('REDIRECT_URI', scopes)
Exchange the code for a token
token = client.exchange_code('REDIRECT_URI', 'CODE')
Set the token
client.set_access_token('TOKEN')
Get account information
response = client.get_account(')
Get media
response = client.get_media('MEDIA_ID')
Create subscription
response = client.create_subscription('user', 'media', 'A_SECRET_RANDOM_KEY', 'NOTIFICATION_URL')
Get subscriptions
response = client.get_subscriptions()
Delete subscription
response = client.delete_subscription('SUBSCRIPTION_ID')
We are always grateful for any kind of contribution including but not limited to bug reports, code enhancements, bug fixes, and even functionality suggestions.
You can report any bug you find or suggest new functionality with a new issue.
- Fork it ( https://github.com/GearPlug/instagram-python )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Adds my new feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request