Skip to content
DocumentationAPI Reference

Get Current User's Profile

MeRetrieveResponse me().retrieve(MeRetrieveParamsparams = MeRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/me

Get detailed profile information about the current user (including the current user's username).

ParametersExpand Collapse
MeRetrieveParams params
ReturnsExpand Collapse
class MeRetrieveResponse:
Optional<String> id

The Spotify user ID for the user.

Optional<String> country

The country of the user, as set in the user's account profile. An ISO 3166-1 alpha-2 country code. This field is only available when the current user has granted access to the user-read-private scope.

Optional<String> displayName

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

Optional<String> email

The user's email address, as entered by the user when creating their account. Important! This email address is unverified; there is no proof that it actually belongs to the user. This field is only available when the current user has granted access to the user-read-email scope.

Optional<ExplicitContent> explicitContent

The user's explicit content settings. This field is only available when the current user has granted access to the user-read-private scope.

Optional<Boolean> filterEnabled

When true, indicates that explicit content should not be played.

Optional<Boolean> filterLocked

When true, indicates that the explicit content setting is locked and can't be changed by the 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<ExternalUrlObject> externalUrls

Known 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 the 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<String> product

The user's Spotify subscription level: "premium", "free", etc. (The subscription level "open" can be considered the same as "free".) This field is only available when the current user has granted access to the user-read-private scope.

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> type

The object type: "user"

Optional<String> uri

The Spotify URI for the user.

Get Current 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.me.MeRetrieveParams;
import dev.cjav.spotted.models.me.MeRetrieveResponse;

public final class Main {
    private Main() {}

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

        MeRetrieveResponse me = client.me().retrieve();
    }
}
{
  "id": "id",
  "country": "country",
  "display_name": "display_name",
  "email": "email",
  "explicit_content": {
    "filter_enabled": true,
    "filter_locked": true,
    "published": true
  },
  "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
    }
  ],
  "product": "product",
  "published": true,
  "type": "type",
  "uri": "uri"
}
Returns Examples
{
  "id": "id",
  "country": "country",
  "display_name": "display_name",
  "email": "email",
  "explicit_content": {
    "filter_enabled": true,
    "filter_locked": true,
    "published": true
  },
  "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
    }
  ],
  "product": "product",
  "published": true,
  "type": "type",
  "uri": "uri"
}