GET /me/settings/

Get the current user's settings.

Resource Information

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

Query Parameters

Parameter Type Description
context (string)
display:
(default) Formats the output as HTML for display. Shortcodes are parsed, paragraph tags are added, etc..
edit:
Formats the output for editing. Shortcodes are left unparsed, significant whitespace is kept, etc..
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.

Response Parameters

Parameter Type Description
enable_translator (bool) Is in-page translation enabled for the current user?
surprise_me (bool) Is "Surprise Me" mode enabled for the current user?
post_post_flag (bool) Is Post-post is enabled for the current user?
holidaysnow (bool) Is holiday snow enabled for the current user?
user_login (string) Get the current user's username.
display_name (string) Get the current user's display name.
first_name (string) Get the current user's first name.
last_name (string) Get the current user's last name.
description (string) Get the current user's About Me HTML.
user_email (string) Get the current user's email address.
user_email_change_pending (bool) Is an email change pending for the current user?
new_user_email (string) Get the email address a pending change would switch to.
user_URL (url) Get the current user's public profile URL setting.
language (string) Get the current user's interface language code.
avatar_URL (url) Get the current user's Gravatar image URL.
primary_site_ID (int) Get the current user's primary site ID.
comment_like_notification (bool) Are comment likes notification emails enabled for the current user?
mentions_notification (bool) Are mentions notification emails enabled for the current user?
subscription_delivery_email_default (string) Get the default email delivery frequency for new subscriptions (never, instantly, daily or weekly).
subscription_delivery_jabber_default (bool) Will new follows include jabber subscription?
subscription_delivery_mail_option (string) Get how subscription emails should be formatted: as HTML (html) or as plain text (text).
subscription_delivery_day (int) Get when subscription emails should be delivered: 0: Sunday, 1: Monday, etc. (Applies when subscription_delivery_email_default equals weekly.)
subscription_delivery_hour (int) Get at what hour of the day subscription emails should be delivered. Uses even numbers from 0 to 22, inclusive. (Applies when subscription_delivery_email_default equals daily or weekly.)
subscription_delivery_email_blocked (bool) Are all WordPress.com subscription emails blocked for the current user?
two_step_enabled (bool) Is two-step enabled for the current user?
two_step_sms_enabled (bool) Is the user using SMS as their second factor (instead of a code generating app)?
two_step_backup_codes_printed (bool) Has the current user printed their backup codes?
two_step_sms_country (string) Get the country for SMS backup for the current user (e.g. "US").
two_step_sms_phone_number (string) Get the phone number for SMS backup for the current user (should not include + or country code).
calypso_preferences (object) Get the preferences associated with a user's WordPress.com Calypso experience.
jetpack_connect (array) Get the urls of the jetpack sites the user have attempted to connect from Calypso
locale_variant (string) The locale variant locale code, if any.

Resource Errors

This endpoint does not return any errors.

Example

curl \
 -H 'authorization: Bearer YOUR_API_TOKEN' \
 'https://public-api.wordpress.com/rest/v1.1/me/settings/'
<?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.1/me/settings/',
	false,
	$context
);
$response = json_decode( $response );
?>

Response

{
    "enable_translator": false,
    "surprise_me": false,
    "post_post_flag": true,
    "holidaysnow": true,
    "user_login": "testuser",
    "display_name": "Mr. Test",
    "first_name": "Testy",
    "last_name": "Test",
    "description": "I am a test user.",
    "user_email": "test@example.com",
    "user_email_change_pending": false,
    "new_user_email": "",
    "user_URL": "http:\/\/example.com",
    "language": "en",
    "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
    "primary_site_ID": 415,
    "comment_like_notification": false,
    "mentions_notification": false,
    "subscription_delivery_email_default": "never",
    "subscription_delivery_jabber_default": false,
    "subscription_delivery_mail_option": "html",
    "subscription_delivery_day": 1,
    "subscription_delivery_hour": 8,
    "subscription_delivery_email_blocked": false,
    "two_step_enabled": true,
    "two_step_backup_codes_printed": true,
    "two_step_sms_country": "US",
    "two_step_sms_phone_number": "4255551212",
    "calypso_preferences": {},
    "jetpack_connect": [],
    "_headers": {
        "Date": "Wed, 14 Jan 2015 19:42:52 GMT",
        "Content-Type": "application\/json"
    }
}