# systemSettings API not working according to documentation

**URL:** <https://community.dhis2.org/t/systemsettings-api-not-working-according-to-documentation/47284>\
**Category:** Support - Assistance technique\
**Created:** [17 May 2022 21:22 UTC](https://community.dhis2.org/t/systemsettings-api-not-working-according-to-documentation/47284 "2022-05-17T21:22:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chase.freeman](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/chase.freeman/32/29570_2.png) [@chase.freeman](https://community.dhis2.org/u/chase.freeman)\
**Post date:** [17 May 2022 21:22 UTC](https://community.dhis2.org/t/systemsettings-api-not-working-according-to-documentation/47284/1 "2022-05-17T21:22:52Z")

</div>

Can someone explain to me why the systemSettings API examples don’t work for at least these four key/value pairs? I cannot POST or PUT to change the values. I’ve tried passing them as plain/text, JSON, and as parameters, all which should be valid according to the docs:

1. credentialsExpires
2. credentialsExpiryAlert
3. accountExpiryAlert
4. accountExpiresInDays

> **[Developer Manual - DHIS2 Documentation](https://docs.dhis2.org/en/full/develop/dhis-core-version-master/developer-manual.html#webapi_system_settings)**
>
> Official documentation of the DHIS2 platform

How else are we supposed to fine-tune our account management policies? The preset expiries are insufficient for our needs.

Any insights would be appreciated. Note - I am not trying to add or customize the settings but to set the values within their reasonable scope.

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [18 May 2022 16:26 UTC](https://community.dhis2.org/t/systemsettings-api-not-working-according-to-documentation/47284/2 "2022-05-18T16:26:35Z")

</div>

Hi @chase.freeman,

I tried this POST request and it worked [https://play.dhis2.org/2.37.6/api/33/systemSettings/accountExpiresInDays?value=8](https://play.dhis2.org/2.37.6/api/33/systemSettings/accountExpiresInDays?value=8) – accountExpiresInDays is not supported in versions older than 2.37 but the POST request,  
[https://play.dhis2.org/2.36.10/api/systemSettings/credentialsExpires?value=8](https://play.dhis2.org/2.36.10/api/systemSettings/credentialsExpires?value=8) worked in 2.36.10…

However, the same requests in 2.38.0 give me a result “Access Denied” and this is probably because the new personal access tokens settings. I think to perform that request in 2.38.0, we’d need to create a token for that first. [DHIS v2.37 Platform - Personal Access Tokens - YouTube](https://www.youtube.com/watch?v=Jb6XWIspGto)

---

<div class="post-metadata">

**Author:** ![chase.freeman](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/chase.freeman/32/29570_2.png) [@chase.freeman](https://community.dhis2.org/u/chase.freeman)\
**Post date:** [18 May 2022 17:00 UTC](https://community.dhis2.org/t/systemsettings-api-not-working-according-to-documentation/47284/3 "2022-05-18T17:00:09Z")

</div>

Thanks for your help @Gassim - Either way it is mess to manage and should be prioritized as it is closely related to managing the security of one’s DHIS2 instance.
