Spotify is the world's leading music streaming platform, with developer access to track and artist metadata, audio features, personalised recommendations, playlists, and global top charts.
MoEngage <> Spotify
The MoEngage <> Spotify integration allows you to personalise music and entertainment app campaigns with live track, artist, and playlist data at send time. Common use cases include recommending new releases by an artist a user follows, surfacing a user's top tracks in a re-engagement campaign, or promoting chart-topping content based on a user's genre preferences.
Integration
| library_add_check |
Prerequisites Ensure you have a Spotify developer account with an active app. Register at developer.spotify.com/dashboard. Spotify uses OAuth 2.0 for authentication. |
Step 1: Get your Spotify credentials
- Navigate to developer.spotify.com/dashboard and log in with your Spotify account.
- Click Create app, fill in the required details, and save. Your Client ID and Client Secret are displayed on the app dashboard.
- Spotify uses OAuth 2.0 Client Credentials flow for non-user-specific data. Exchange your Client ID and Client Secret for an access token via
POST https://accounts.spotify.com/api/token. If this API requires OAuth 2.0, enable the OAuth toggle and configure your credentials there. New to OAuth 2.0? See Authorization Configuration with OAuth 2.0.
Step 2: Set up the Content API on MoEngage
- Navigate to Dashboard > Settings > APIs and open the Content API tab.
- Click Add Content API.
- Fill in the details using the table below as a reference.
| Key | Value | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Name | Choose a descriptive name, for example Spotify New Releases. |
|||||||||
| Method | GET | |||||||||
| API URL |
Other useful endpoints: |
|||||||||
| Headers |
|
|||||||||
| Key Value Parameters |
|
- Click Validate to confirm the platform returns a response, then click Save.
Once saved, refer to the MoEngage documentation on using Content APIs in campaigns to learn how to reference response fields inside your campaign templates.
Understanding the API response
For new releases, the response contains an albums.items array. Each object represents one album.
| Response field | Template variable example | Description |
|---|---|---|
albums.items[0].name |
{{ContentApi.albums.items[0].name}} |
Album name. |
albums.items[0].artists[0].name |
{{ContentApi.albums.items[0].artists[0].name}} |
Primary artist name. |
albums.items[0].images[0].url |
{{ContentApi.albums.items[0].images[0].url}} |
Album cover image URL. |
albums.items[0].release_date |
{{ContentApi.albums.items[0].release_date}} |
Release date in YYYY-MM-DD format. |
albums.items[0].external_urls.spotify |
{{ContentApi.albums.items[0].external_urls.spotify}} |
Direct Spotify link to the album — use as a CTA. |