Skip to content
DocumentationAPI Reference

Get User's Profile

UserRetrieveProfileResponse users().retrieveProfile(UserRetrieveProfileParamsparams = UserRetrieveProfileParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/users/{user_id}

Get public profile information about a Spotify user.

ParametersExpand Collapse
UserRetrieveProfileParams params
Optional<String> userId

The user's Spotify user ID.

ReturnsExpand Collapse
class UserRetrieveProfileResponse:
Optional<String> id

The Spotify user ID for this user.

Optional<String> displayName

The name displayed on the user's profile. null if not available.

Optional<ExternalUrlObject> externalUrls

Known public external URLs for this user.

Optional<Boolean> published

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

Optional<String> spotify

The Spotify URL for the object.

Optional<FollowersObject> followers

Information about the followers of this user.

Optional<String> href

This will always be set to null, as the Web API does not support it at the moment.

Optional<Boolean> published

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

Optional<Long> total

The total number of followers.

Optional<String> href

A link to the Web API endpoint for this user.

Optional<List<ImageObject>> images

The user's profile image.

Optional<Long> height

The image height in pixels.

String url

The source URL of the image.

Optional<Long> width

The image width in pixels.

Optional<Boolean> published

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

Optional<Boolean> published

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

Optional<Type> type

The object type.

Optional<String> uri

The Spotify URI for this user.

Get User's Profile

package dev.cjav.spotted.example;

import dev.cjav.spotted.client.SpottedClient;
import dev.cjav.spotted.client.okhttp.SpottedOkHttpClient;
import dev.cjav.spotted.models.users.UserRetrieveProfileParams;
import dev.cjav.spotted.models.users.UserRetrieveProfileResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        SpottedClient client = SpottedOkHttpClient.fromEnv();

        UserRetrieveProfileResponse response = client.users().retrieveProfile("smedjan");
    }
}
{
  "id": "id",
  "display_name": "display_name",
  "external_urls": {
    "published": true,
    "spotify": "spotify"
  },
  "followers": {
    "href": "href",
    "published": true,
    "total": 0
  },
  "href": "href",
  "images": [
    {
      "height": 300,
      "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
      "width": 300,
      "published": true
    }
  ],
  "published": true,
  "type": "user",
  "uri": "uri"
}
Returns Examples
{
  "id": "id",
  "display_name": "display_name",
  "external_urls": {
    "published": true,
    "spotify": "spotify"
  },
  "followers": {
    "href": "href",
    "published": true,
    "total": 0
  },
  "href": "href",
  "images": [
    {
      "height": 300,
      "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
      "width": 300,
      "published": true
    }
  ],
  "published": true,
  "type": "user",
  "uri": "uri"
}