POST account/settings

Updated on Mon, 2012-10-15 07:07

Updates the authenticating user's settings.

Resource URL

https://api.twitter.com/1.1/account/settings.json

Parameters

While all parameters for this method are optional, at least one or more should be provided when executing this request.

trend_location_woeid optional

The Yahoo! Where On Earth ID to use as the user's default trend location. Global information is available by using 1 as the WOEID. The woeid must be one of the locations returned by GET trends/available.

Example Values: 1

sleep_time_enabled optional

When set to true, t or 1, will enable sleep time for the user. Sleep time is the time when push or SMS notifications should not be sent to the user.

Example Values: true

start_sleep_time optional

The hour that sleep time should begin if it is enabled. The value for this parameter should be provided in ISO8601 format (i.e. 00-23). The time is considered to be in the same timezone as the user's time_zone setting.

Example Values: 13

end_sleep_time optional

The hour that sleep time should end if it is enabled. The value for this parameter should be provided in ISO8601 format (i.e. 00-23). The time is considered to be in the same timezone as the user's time_zone setting.

Example Values: 13

time_zone optional

The timezone dates and times should be displayed in for the user. The timezone must be one of the Rails TimeZone names.

Example Values: Europe/Copenhagen, Pacific/Tongatapu

lang optional

The language which Twitter should render in for this user. The language must be specified by the appropriate two letter ISO 639-1 representation. Currently supported languages are provided by GET help/languages.

Example Values: it, en, es

Example Request

POST

https://api.twitter.com/1.1/account/settings.json

POST Data

lang=en

  1. {
  2.   "sleep_time": {
  3.     "end_time": null,
  4.     "enabled": false,
  5.     "start_time": null
  6.   },
  7.   "use_cookie_personalization": true,
  8.   "trend_location": [
  9.     {
  10.       "name": "San Francisco",
  11.       "placeType": {
  12.         "name": "Town",
  13.         "code": 7
  14.       },
  15.       "woeid": 2487956,
  16.       "country": "United States",
  17.       "url": "http://where.yahooapis.com/v1/place/2487956",
  18.       "countryCode": "US",
  19.       "parentid": 23424977
  20.     }
  21.   ],
  22.   "language": "en",
  23.   "discoverable_by_email": true,
  24.   "always_use_https": true,
  25.   "protected": false,
  26.   "geo_enabled": true,
  27.   "show_all_inline_media": false,
  28.   "screen_name": "oauth_dancer"
  29. }