1.3 KiB
1.3 KiB
title | description | menu | aliases | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
preferences API methods | Preferred common behaviors to be shared across clients. |
|
|
View user 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
Request
Headers
- Authorization
- {{}} Provide this header with
Bearer <user token>
to gain authorized access to this API method.
Response
200: OK
{
"posting:default:visibility": "public",
"posting:default:sensitive": false,
"posting:default:language": null,
"reading:expand:media": "default",
"reading:expand:spoilers": false
}
401: Unauthorized
Invalid or missing Authorization header.
{
"error": "The access token is invalid"
}
See also
{{< 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" >}}