<a id="instagram"></a>

# Instagram

<a id="backend-class"></a>

## Backend class

For Django, add this class path to `AUTHENTICATION_BACKENDS`. For other
integrations, use the same class path in the framework-specific backend
setting.

| Backend name   | Class path                                       |
|----------------|--------------------------------------------------|
| `instagram`    | `social_core.backends.instagram.InstagramOAuth2` |

Instagram uses OAuth v2 for Authentication.

- Register a new application at the [Instagram API](http://instagr.am/developer/), and
- Add instagram backend to `AUTHENTICATION_SETTINGS`:
  ```default
  AUTHENTICATION_SETTINGS = (
    ...
    'social_core.backends.instagram.InstagramOAuth2',
    ...
  )
  ```
- fill `Client Id` and `Client Secret` values in the settings:
  ```default
  SOCIAL_AUTH_INSTAGRAM_KEY = ''
  SOCIAL_AUTH_INSTAGRAM_SECRET = ''
  ```
- extra scopes can be defined by using:
  ```default
  SOCIAL_AUTH_INSTAGRAM_AUTH_EXTRA_ARGUMENTS = {'scope': 'likes comments relationships'}
  ```
