title: preferences API methods description: Preferred common behaviors to be shared across clients. menu: docs:
weight: 110
name: preferences
parent: methods-accounts
identifier: methods-preferences
aliases: [ "/methods/preferences", "/api/methods/preferences", "/methods/accounts/preferences",
GET /api/v1/preferences HTTP/1.1
Preferences defined by the user in their account settings.
Returns: Preferences by key and value\
OAuth: User token + read:accounts
\
Version history:\
2.8.0 - added
Authorization
: {{}} Provide this header with Bearer <user token>
to gain authorized access to this API method.
{
"posting:default:visibility": "public",
"posting:default:sensitive": false,
"posting:default:language": null,
"reading:expand:media": "default",
"reading:expand:spoilers": false
}
Invalid or missing Authorization header.
{
"error": "The access token is invalid"
}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/preferences_controller.rb" caption="app/controllers/api/v1/preferences_controller.rb" >}}