<a id="spotify"></a>

# Spotify

<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                                   |
|----------------|----------------------------------------------|
| `spotify`      | `social_core.backends.spotify.SpotifyOAuth2` |

Spotify supports OAuth 2.

- Register a new application at [Spotify Web API](https://developer.spotify.com/spotify-web-api), and follow the
  instructions below.

<a id="oauth2"></a>

## OAuth2

Add the Spotify OAuth2 backend to your settings page:

```default
SOCIAL_AUTH_AUTHENTICATION_BACKENDS = (
    ...
    'social_core.backends.spotify.SpotifyOAuth2',
    ...
)
```

- Fill `App Key` and `App Secret` values in the settings:
  ```default
  SOCIAL_AUTH_SPOTIFY_KEY = ''
  SOCIAL_AUTH_SPOTIFY_SECRET = ''
  ```
