Website Flow
Let subscribers play locked episodes on your own website instead of in a podcast app.
Every user with access to a podcast has a private feed: a standard RSS feed that contains the locked episodes they are entitled to. On your website, you fetch the URL of that feed for the logged-in user, read the episodes from it, and play them in your own audio player.
How It Works
- List the user's podcast entitlements
- Get the access details for the entitlement, which include the private feed URL
- Fetch and parse the RSS feed, and render the episodes in your player
Implementation
import { client } from '@sesamy/sdk';
const sdk = client({
baseUrl: 'https://api2.sesamy.com',
tokenProvider: async () => getUserToken(),
});
// Find the user's entitlement for the podcast
const [entitlement] = await sdk.entitlements.list({
type: 'podcast',
sku: 'sid:acme-podcast',
});
if (entitlement) {
// Access details for the private feed
const access = await sdk.entitlements.getAccess(entitlement.id);
console.log(access.url);
}The private feed is a standard RSS feed. Parse it with any RSS library and play each episode's <enclosure> URL in an <audio> element or your existing player.
Paused access
If the user's access is paused, getAccess fails with 403 ENTITLEMENT PAUSED. Show a message asking them to update their subscription instead of an empty player.
Display Options
You have full control over how the podcast content is displayed on your website:
- Build a custom podcast player from the feed data
- Create episode listings with play buttons
- Integrate with your existing audio player
- Show episode descriptions and metadata
Authentication Options
Sesamy Authentication
When using Sesamy's built-in authentication:
- Users log in through Sesamy
- Access is automatically validated
- Private feed URLs are generated per user
Custom Authentication
When using your own authentication system:
- Validate user subscriptions on your server
- Get the private feed for the user from the Sesamy API
- Pass the feed URL to your frontend
API Reference
| Endpoint | Description |
|---|---|
GET https://api2.sesamy.com/entitlements | List the user's entitlements |
GET https://api2.sesamy.com/entitlements/{id}/access | Get access details, including the private feed URL |
See the API Reference for complete endpoint documentation.