<p></p>
<p>Discovered that while the <code>/api/0.6/user/details</code> endpoint will provide a json response, the <code>/api/0.6/user/preferences</code> endpoint does not. :(</p>
<p><strong>GET /api/0.6/user/details with "Accept: application/json" header:</strong><br>
<code>{"user":{"id":12345,"display_name":"firstname surname","account_created":"1970-01-01T18:18:36Z","description":"","contributor_terms":{"agreed":true,"pd":false},"img":{"href":"https://www.gravatar.com/avatar/00000000000000000000000000.jpg"},"roles":[],"changesets":{"count":0},"traces":{"count":0},"blocks":{"received":{"count":0,"active":0}},"languages":["en-GB", "en"],"messages":{"received":{"count":0,"unread":0},"sent":{"count":0}}}}</code></p>
<p><strong>GET /api/0.6/user/preferences with "Accept: application/json" header:</strong></p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
  <preferences>
<preference k="diary.default_language" v="en"/>
  </preferences>
</osm>
</code></pre>
<p>Looking at the codebase, this doesn't look particular hard to implement but I wanted to a) flag it as an issue and b) check if it would be worthwhile investing the time implementing it (e.g. by submitting a PR).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3160">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLC6SHUYFWWCBFBURLTHCFF3ANCNFSM42LRIUJQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLJR6TVPTILSM6H2RPLTHCFF3A5CNFSM42LRIUJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MVIRJMQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/3160",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3160",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>