Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get user-specific information using the API? #27

Open
varamsky opened this issue Dec 20, 2020 · 4 comments
Open

How to get user-specific information using the API? #27

varamsky opened this issue Dec 20, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@varamsky
Copy link

Hi @cyberboysumanjay,

I really liked your project. It's a shame that such a popular music streaming service doesn't have an official API.

Anyway, I think that it would be great if you could somehow add the functionality of getting user-specific information from your API.

For example, it would be great if I could get my playlists information from your API. And it would be awesome if you could somehow figure out ways to post changes to saavn through the API. For example, one could use your API to add new songs to a particular playlist. It would be very useful in a large number of projects.

Think about this suggestion :)

@cyberboysumanjay
Copy link
Owner

Hey! Thanks for your useful suggestions.

First I would like to tell you that the API already supports user created playlist. Just use the results or playlist endpoint and pass your playlist link, it'll fetch all your songs

Regarding the ability to post your changes to your playlist that is something which will require authentication and will make the API complex as per the current structure. I'll definitely try to add support for this in future updates.

@varamsky
Copy link
Author

First I would like to tell you that the API already supports user created playlist. Just use the results or playlist endpoint and pass your playlist link, it'll fetch all your songs

Actually, I wished to provide my JioSaavn USER ID and it should fetch all the playlists that I have, and I should be able to add or delete songs to and from my playlists.

This is what I meant, as this can be easily used in a lot of other projects.

I understand that it will require authentication but it will really enhance this project.

@cyberboysumanjay cyberboysumanjay added the enhancement New feature or request label Dec 29, 2020
@Chetan-Goyal
Copy link
Contributor

@varamsky It is doable but JioSaavn will change their endpoints as soon as they discovers about such unofficial requests and endpoints of this API will break again and again. This will affect the performance of the projects built on this API. In my opinion, It will be good but will also make it difficult for keeping project up and running for long term.

@AvTe
Copy link

AvTe commented Mar 26, 2021

Hi @cyberboysumanjay,

I really liked your project. It's a shame that such a popular music streaming service doesn't have an official API.

Anyway, I think that it would be great if you could somehow add the functionality of getting user-specific information from your API.

For example, it would be great if I could get my playlists information from your API. And it would be awesome if you could somehow figure out ways to post changes to saavn through the API. For example, one could use your API to add new songs to a particular playlist. It would be very useful in a large number of projects.

Think about this suggestion :)

The GET /api/v2/users/{id} endpoint allows you to retrieve a specific user using their Auth0 user ID.

This endpoint is immediately consistent, and as such, we recommend that you use this endpoint for:

User searches run during the authentication process.

User searches run as part of the account linking process.

The user ID should be URL encoded since it may contain characters that do not work well in a URL.

Request example

Required Scopes: read:users
### cURL

curl --request GET \
  --url 'https://YOUR_DOMAIN/api/v2/users/USER_ID' \
  --header 'authorization: Bearer YOUR_MGMT_API_ACCESS_TOKEN'
{
  "email": "[email protected]",
  "email_verified": false,
  "username": "johndoe",
  "phone_number": "+199999999999999",
  "phone_verified": false,
  "user_id": "usr_5457edea1b8f33391a000004",
  "created_at": "",
  "updated_at": "",
  "identities": [
    {
      "connection": "Initial-Connection",
      "user_id": "5457edea1b8f22891a000004",
      "provider": "auth0",
      "isSocial": false
    }
  ],
  "app_metadata": {},
  "user_metadata": {},
  "picture": "",
  "name": "",
  "nickname": "",
  "multifactor": [
    ""
  ],
  "last_ip": "",
  "last_login": "",
  "logins_count": 0,
  "blocked": false,
  "given_name": "",
  "family_name": ""
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants