Skip to content
DocumentationAPI Reference

Get Current User's Profile

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

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

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

The Spotify user ID for the user.

country: Optional<String>

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.

displayName: Optional<String>

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

email: Optional<String>

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.

explicitContent: Optional<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.

filterEnabled: Optional<Boolean>

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

filterLocked: Optional<Boolean>

When true, indicates that the explicit content setting is locked and can't be changed by the user.

published: Optional<Boolean>

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

externalUrls: Optional<ExternalUrlObject>

Known external URLs for this user.

published: Optional<Boolean>

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

spotify: Optional<String>

The Spotify URL for the object.

followers: Optional<FollowersObject>

Information about the followers of the user.

href: Optional<String>

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

published: Optional<Boolean>

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

total: Optional<Long>

The total number of followers.

href: Optional<String>

A link to the Web API endpoint for this user.

images: Optional<List<ImageObject>>

The user's profile image.

height: Optional<Long>

The image height in pixels.

url: String

The source URL of the image.

width: Optional<Long>

The image width in pixels.

published: Optional<Boolean>

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

product: Optional<String>

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.

published: Optional<Boolean>

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

type: Optional<String>

The object type: "user"

uri: Optional<String>

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

fun main() {
    val client: SpottedClient = SpottedOkHttpClient.fromEnv()

    val me: MeRetrieveResponse = 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"
}