users/*/playlists not returning starred/collaborative playlists - spotify

Last week calls to users/{user_id}/playlists returned a complete list of the users playlists, which included:
their own starred playlists
starred playlists they subscribe too
collaborative playlists they created/subscribed to
Now, this endpoint doesn't seem to return any of these items.
For example, I have a playlist which returns fine UNTIL I change it to be collaborative... then it is no longer in the response.
I have tested this with various combinations of scope authentication.

The /users/{user_id}/playlists endpoint is not guaranteed to return starred tracks. We'll add a specific endpoint to retrieve starred tracks in a very near future, and we'll announce the changes in the change log.
Collaborative playlists are never returned regardless of scope, which is the current intended behaviour. This is covered in the documentation for users/{user_id}/playlists.
Note that a user's collaborative playlists are not currently
retrievable.
We're doing a lot of thinking about how to allow developers to work with collaborative playlists, so please stay tuned for news on the Developer site.

Related

Instagram search user api always return empty result with success code

We are invoking instagram search users api to get profile list as
https://api.instagram.com/v1/users/search?q={search-term}&access_token={access-token}
but we are getting always empty result with success code as
{"meta": {"code": 200}, "data": []}
Our search term would be always instagram username i.e. username portion from https://www.instagram.com/username/
I remember this was working before 2-3 months. Any other are facing similar issue?
Sounds like you already figured out your problem. In case anyone else is having the same problem, here's a short article summarizing how Instagram's Sandbox Mode works.
TL;DR
“Sandbox mode” is the (unintuitively-named) gatekeeper walling off
most of what you want to do. This is the default status for all
clients, that have not undergone the strict submission process. An API
client in sandbox mode has extremely limited permissions. In fact, it
has fewer permissions than an anonymous user viewing public content
because your app basically lives on a tiny desert island in which you
are the only Instagram user and only your past twenty posts exist. So,
for example, the /media/search endpoint will only return the media you
uploaded near a given location, excluding the media from everyone else
or any posts beyond your last twenty.
So your API call is succeeding. It just isn't finding any results because it can only "see" other sanbox users for your client.

How to grab user track info through spotify api

I recently just got through the beginning tutorial for creating a web app with the spotify api. https://developer.spotify.com/web-api/tutorial/. The tutorial was great for showing how to authenticate a user with oauth and log in a user.
The problem I am having is with the endpoint. I can't seem to figure out how to change the endpoint so that instead of displaying a users profile, I can see a list of a users track, better yet starred or top 10 tracks.
for a 10,000 view perspective of what I want to build is a app that would allow users to easily log in through their spotify account, take their stared or top tracks and push them to a radio that I am building with an raspberry pi.
I am new to working with the spotify api and working with api's in general so whatever advice would be awesome.
At the moment, there is no way to get the "starred"-playlist. (At least it's not documented)
I don't know what you mean with "Top 10 User tracks", since this doesn't exist as far as I know
To get a list of the account's current playlists, change the URL to:
https://api.spotify.com/v1/users/{user_id}/playlists
With this URL, you will get a list of simple-playlist-objects wrapped inside a paging-object. Now you can select one of the playlists (or loop through them) and fetch its track this way
NOTE:
If you also want to fetch private playlists, make sure you use the scope playlist_read_private

How to grab instagram users based on a hashtag?

is there a way to grab instagram users based on a specific hashtag ?
I run contests based on re posting photos with specified hashtag then randomly pick a winner, i need a tool that can grab the usernames of those who reposted that photo and used that hashtag.
You can query instagram using the API. There are official clients for both python and ruby.
You didn't specify what language/platform you are using, so I'll give you the generic approach.
Query instagram using the Tag Recent Media endpoint.
In the response, you will receive a user object that has the user's username, id, profile url, and so on. This should be enough to do what you are describing.
As far as tools, there aren't great options to probably do things exactly how you want. If you just want a simple contest, you could use statigram, but it's not free.
If you roll your own solution, I highly recommend you also do the following:
Implement a rate limiting mechanism such as a task queue so you don't exceed your API calls (5000 per hour for most calls). Also useful for failures/network hicups, etc.
Have users authenticate so you can use OAuth to extend your API calls to 5000/per user/hour to get around #1.
Try the subscribe API if there won't be many items. You can subscribe to a specific tag as well, and you will get a change notification. At that point though you need to retrieve the actual media item(s), and this can cost a lot of API calls depending on how frequent and what volume these changes occur.
If your users don't have much photos/relatively small/known in advance, you can actually query the user's recent media instead and filter in your own code by hash tag.

Create app-bound playlist on Spotify

Is it possible to create an app-bound playlist?
It's possible to create a playlist for a user, but how will I know which one that is when they move away from my app?
Ideally, I would only need to be able to create/edit 1 playlist.
Edit: Have found this http://developer.spotify.com/technologies/apps/guidelines/integration/#appsthatcreateplaylisturi:s
But if anyone has great ideas, I'm still open!
As you've found out yourself, you can't create a playlist in a user's library that's somehow linked to your application using the Spotify Apps API.
I thought it'd be a good idea to also quote the relevant part of the Integration Guidelines that you've linked to:
If you want to generate and save the user’s personal playlists in the
app, you should not keep playlist information only saved within the
app. Playlist information should instead be handled by utilizing user
playlists, so that the user can access playlists as usual. They
shouldn’t have to go to the app to access a certain playlist that they
have created.
Suggestion:
I think there's several ways to do what you want to do though.
One way could be to let a user create a new playlist using your application and save it to the user's library, and at the same time save the playlist URI to your own back end. As you've noted, playlist URIs are obfuscated (e.g. they look like spotify:user:#:playlist:783BHaT7Xb8K5VyYstxsj3 instead of spotify:user:thelinmichael:playlist:783BHaT7Xb8K5VyYstxsj3, the username is replaced by # for the currently logged in user, and #xxx.. for other users). You could still save the last part of the URI, which I believe is unique for every playlist. Using a hashmap to map that part of the playlist URI to properties you want to keep track of would let you do quick lookups of a user's playlists to see if they are associated to your app. You could iterate though the user's library to gather all obfuscated URIs, and send them to your backend in a single HTTP request. The response from your server could be the index of the library playlists that matched the playlist on your backend, along with the properties you've mapped to it. Again, this was just a suggestion and possibly not the best way forward but I hope it gave you some ideas. :-)

Endpoint for getting friends who have been to a venue

The website has had for some time now a section that shows friends who have been to a certain venue, yet I do not see an endpoint for getting this information.
Is such an endpoint in the works or is this considered a privacy issue like friends history even though they're both on the website???
There is no API endpoint with this functionality yet. There's a variety of reasons for why this is the case, but the primary one is that it hasn't hit the top of our priority stack just yet (this element of the website was not built off of the API)

Resources