Content & Documents · Integration
Spotify
Add Spotify to your product for your customers, and give your AI agents governed access to it.
The Spotify Web API is scoped to an individual listener rather than to a company, so be plain about whose account this connects: each of your end users authorises their own personal Spotify account, and the scopes that person grants decide what you can see. The assets are tracks, albums and artists; playlists are how a listener organises them, and a private playlist stays private unless that scope was granted. Two facts shape the build. Playback control needs an active device and a paid account, so your product has to treat no available device as a normal answer rather than an error. And tokens are short-lived per listener, so refresh happens for every connected person rather than once for your app. fastn holds each listener's tokens and follows the API.
In your product
Embedded for your customers. Per-tenant auth, no per-customer code, maintained by fastn.
Let each end user authorise their own personal Spotify account inside your product, so their library is theirs rather than a catalogue you curated.
Create a playlist and add tracks to it on a listener's behalf, so something your product assembled ends up in the app they already listen in.
Read recently played tracks and top artists to personalise what your product shows, using only the scopes that person granted.
Control playback on the listener's active device, and handle no active device and unpaid accounts as expected outcomes rather than failures.
For your AI agents
Governed, audited access for the agents you build, through the MCP server.
An agent builds a playlist from a description and files it in the listener's own account, with the tracks it added logged.
An agent reads what someone has been listening to before it suggests anything, scoped to that one connected account.
An agent checks which device is active before it starts playback, and explains why it cannot when none is.
Example prompt
Build a playlist from the artists I have listened to most this month and save it to my account.
Set up Spotify in 4 steps
- 01Enable the Spotify connector in your fastn dashboard.
- 02Have each end user authorise their own Spotify account, requesting only the playlist, library and playback scopes your features use.
- 03Map the playlist, track and artist fields your product reads, and decide what happens when playback has no active device.
- 04Call it from your product and expose the same connection to your agents through the MCP gateway.
Why teams use the Spotify integration
What you get by embedding it with fastn instead of building it yourself.
- Ship a Spotify integration without building it. Your customers connect their own Spotify account inside your product and work their files, documents and versions there, with no per-customer code on your side.
- Handle the part that actually costs time: permissions and versioning are easy to get subtly wrong, and mistakes expose content. fastn owns the auth, token refresh, rate limits, pagination and breaking-change fixes, so a Spotify update is not your on-call problem.
- One integration serves your product and your agents. The same governed Spotify connection powers in-product features and gives AI agents scoped, audited access, so you let your product work with your customers' documents in place without wiring it twice.
Used by these teams
Works well with
Often used alongside
Tools the same teams tend to run next to Spotify, across other categories.
Spotify integration FAQ
How do I add a Spotify integration to my product?
Enable the Spotify connector in your fastn dashboard, then let each customer authenticate their own Spotify account. fastn handles the OAuth flow, token storage and refresh per tenant, so there is no Spotify client code in your app and no per-customer branch in your codebase. Setup is 4 steps.
Do my customers each connect their own Spotify account?
Yes. Every connection is scoped to the individual customer, so each authorises their own Spotify account and only ever sees their own files, documents and versions. That per-tenant isolation is the point of an embedded integration: you support the long tail of customer setups without maintaining an integration per customer.
Can AI agents use this Spotify integration?
Yes. The same connection is exposed to your agents through the fastn MCP gateway, with permissions scoped per tenant and every call audited. An agent builds a playlist from a description and files it in the listener's own account, with the tracks it added logged.
Who maintains the Spotify integration?
fastn does. When Spotify changes an endpoint, deprecates a field or alters its auth, the fix lands in the connector rather than in your backlog, and your customers' connections keep working.
Whose permissions does the Spotify integration run under?
Each customer's own Spotify grant. Where Spotify holds a library, their existing folder and item permissions apply and your product cannot reach content the connected account could not reach itself. Where it processes content you supply rather than storing it, the call runs under that customer's own credentials and is logged per tenant.
Can my product create or update content in Spotify automatically?
Where Spotify supports writes, documents, entries and assets can be created, updated and filed from your product or by an agent within scoped permissions, with each action logged. Where it is a read surface, the same connection serves reads only.
What can I build with the Spotify integration?
A common starting point: let each end user authorise their own personal Spotify account inside your product, so their library is theirs rather than a catalogue you curated. Teams also use it for the other use cases listed above, and expose it to agents for governed reads and writes.
How much does the Spotify integration cost?
It is included. Pricing is based on connected accounts, not on how many connectors you enable, so adding Spotify does not change your per-connector cost. You can start free with 3 connected accounts.
Add Spotify to your product
Start free with 3 connected accounts. No sales call required, and no per-customer integration code.