Skip to content

GET/me

Get metadata about the current user.

Resource Information

   
Method GET
URL https://public-api.wordpress.com/rest/v1.1/me
Requires authentication? Yes

Query Parameters

Parameter Type Description
http_envelope (bool)
false:
(default)
true:
Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code. Setting this parameter will force the HTTP status code to always be 200. The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.
pretty (bool)
false:
(default)
true:
Output pretty JSON
meta (string) Optional. Loads data from the endpoints found in the 'meta' part of the response. Comma-separated list. Example: meta=site,likes
fields (string) Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title
callback (string) An optional JSONP callback function.
abtests (string) Comma separated names of A/B tests the user may have an assigned variation for

Response Parameters

Parameter Type Description
ID (int) Numeric user ID
display_name (string) The name to display for a user
username (string) Login name of a user
email (string) Email address
primary_blog (int) ID of a user's primary blog
primary_blog_url (string) URL to primary blog
primary_blog_is_jetpack (bool) Is the primary blog a jetpack site
has_jetpack_partner_access (bool) True if the user can access the Jetpack Partner API
jetpack_partner_types (array) The partner types of the partner accounts this user has access to.
language (string) User language setting
locale_variant (string) User locale variant, if any
token_site_id (int) ID of the user's site that the current token provides access to
token_scope (array) Scopes that the current access token provides access to
avatar_URL (url) Gravatar image URL
profile_URL (url) Gravatar Profile URL
verified (bool) Has the account been verified (via WordPress.com Connect)?
email_verified (bool) Has the account been verified (via email)?
date (iso 8601 datetime) Datetime the user joined WordPress.com
site_count (int) Number of sites where the user is a member
jetpack_site_count (int) Number of Jetpack sites where the user is a member
atomic_site_count (int) Number of atomic sites where the user is a member
visible_site_count (int) Number of sites where the user is a member, set to visible in user settings
jetpack_visible_site_count (int) Number of Jetpack sites where the user is a member, set to visible in user settings
atomic_visible_site_count (int) Number of atomic sites where the user is a member, set to visible in user settings
has_unseen_notes (bool) Does the account have unseen notifications
newest_note_type (string) notification type slug for newest unseen notification or blank if no unseen notes
phone_account (bool) If this is a phone account then the user doenst have a verified email address
meta (object) Metadata
is_valid_google_apps_country (bool) Is the user somewhere where Google Workspace can be purchased?
user_ip_country_code (string) Country code for the user’s IP address
logout_URL (url) URL to sign user out of WordPress.com
is_new_reader (bool) Is the user new to the Reader?
social_login_connections (array) Array of active social login connections
social_signup_service (string) The name of the social service this account is linked to
abtests (object) User's assigned A/B test variations, where the key is the test name and the value is the variation
lasagna_jwt (string) Lasagna service JWT
i18n_empathy_mode (bool) Has the user enabled I18n empathy mode?
use_fallback_for_incomplete_languages (bool) Should UI be displayed in default locale for languages with incomplete translations
is_google_domain_owner (bool) Is the user the owner of a Google domain
had_hosting_trial (bool) Has the user had a hosting trial

Resource Errors

This endpoint does not return any errors.

Example

curl \
 -H 'authorization: Bearer YOUR_API_TOKEN' \
 'https://public-api.wordpress.com/rest/v1/me/'
<?php
$options  = array (
  'http' => 
  array (
    'ignore_errors' => true,
    'header' => 
    array (
      0 => 'authorization: Bearer YOUR_API_TOKEN',
    ),
  ),
);

$context  = stream_context_create( $options );
$response = file_get_contents(
	'https://public-api.wordpress.com/rest/v1/me/',
	false,
	$context
);
$response = json_decode( $response );
?>