# instagram-python
instagram-python is an API wrapper for Instagram written in Python
## Installing
```
pip install instagram-python-lib
```
## Usage
```
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')
```
### Webhooks
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')
```
instagram-python is an API wrapper for Instagram written in Python
## Installing
```
pip install instagram-python-lib
```
## Usage
```
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')
```
### Webhooks
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')
```
Metadata
Release files for instagram-python-lib 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| instagram-python-lib-0.1.2.tar.gz | 2.8 kB | Details |
Release files / instagram-python-lib-0.1.2.tar.gz
| Download URL | instagram-python-lib-0.1.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f69be35e96104e98c3c3802d6d28207b9abd0c0fe77578daddb740f72c824dd
|
|
BLAKE2b-256 checksum How to use checksums |
37e308158172d5733b9c9454390d21ad57dc57f50989e298359821af289348af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |