Reputation: 1105
Is there a way to access a user's subscription level in any of the Spotify APIs (most likely apps), either explicitly or implicitly (e.g. premium users can only have certain type of attributes)?
It doesn't look like there's any such information in the user profile: https://developer.spotify.com/docs/apps/api/1.0/api-models-user.html
Upvotes: 0
Views: 199
Reputation: 3279
You can use the product
property of the Session:
require([
'$api/models',
], function(models) {
models.session.load('product')
.done(function(s) {
console.log(s.product); // e.g. "premium"
});
});
Upvotes: 1