Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6909379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:40:55+00:00 2026-05-27T08:40:55+00:00

The new Spotify Apps Javascript API contains a number of objects like Album, Library,

  • 0

The new Spotify Apps Javascript API contains a number of objects like Album, Library, Link etc. But how do you actually instantiate and use any of them in your app?
I’ve looked at the tutorial app but all that is used there is the trackPlayer object which isn’t documented as far as I can tell.
The answer to this question suggests looking in the in the app bundle at Spotify.app/Contents/Resources/cef_views. However, I can’t seem to find this on my Mac and there seems to be no corresponding folder on Windows.

Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:40:55+00:00Added an answer on May 27, 2026 at 8:40 am

    First, to answer your second question about where to find the folder (I also posted this as a comment in my own original post):


    In Windows the folder is located as a .zip file (resources.zip) in the data folder next so Spotify.exe. In my case this is

    C:\Users\buchetics\AppData\Roaming\Spotify\Data\resources.zip

    On the Mac, you need to right click Spotify.app and select Show Package Content (or something like that), then you can navigate to the folder inside the bundle.


    Ok, now to your original question. You can get the API objects like this:

    window.Models = sp.require("sp://import/scripts/api/models");
    window.Views = sp.require("sp://import/scripts/api/views");
    

    Then, you can use all the methods and properties as described in the API reference (which is still not very good).
    For example:

    window.CurrentPlaylist = new Models.Playlist();
    var track = Models.Track.fromURI("spotify:track:4n6AGL10M8fbm8oHxhK16j");
    CurrentPlaylist.add(track);
    

    And so on. The Models API is quite easy to use and the Views object can be used to render a track list similar to the regular Spotify lists. For other API calls, such as getting the current playing track, you need to use the core API which is returend by var sp = getSpotifyApi(1);. However, there is no documentation for this yet and the best advice is to look at the code found in cef_views or use the Inspector on the available apps to find useful code pieces (not all of the apps expose their code in a way to easily look at it, but some do, such as the “We are Hunted” or “Songkicks” app).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to ASP and probably never named a Javascript file .inc :-) But that
New to javascript/jquery and having a hard time with using this or $(this) to
New to silverlight. Traditionally if I were to design a wizard-like process where a
New to both Ruby and Rails but I'm book educated by now (which apparently
New to WCF, but familiar with COM+ - can I wrap a WCF service
New Question I am looking for a way in Javascript to get the parent
New question, but really close to need to refresh page in jquery mobile .
Using a code snippet like: sp = getSpotifyApi(1); var models = sp.require(sp://import/scripts/api/models); var tpl
New to MonoTouch and MonoTouch.Dialog, but I'm sure it's possible to create a tab
New-style status messages (as in mobile apps and web interface) have new properties e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.