# Accessing configuration parameter from server-side Lua script

**URL:** https://discourse.orthanc-server.org/t/accessing-configuration-parameter-from-server-side-lua-script/1624
**Category:** Google Groups archive
**Created:** [August 27, 2019, 7:10pm UTC](https://discourse.orthanc-server.org/t/accessing-configuration-parameter-from-server-side-lua-script/1624 "2019-08-27T19:10:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Vedran\_Zdesic](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/v/a9a28c/32.png) [@Vedran\_Zdesic](https://discourse.orthanc-server.org/u/Vedran_Zdesic)
#### Post date: [August 27, 2019, 7:10pm UTC](https://discourse.orthanc-server.org/t/accessing-configuration-parameter-from-server-side-lua-script/1624/1 "2019-08-27T19:10:32Z")

</div>

Hi,

Is it possible somehow to load for example orthanc.json configuration file and read parameter from that file inside server-side Lua script?

My goal is, if this is possible, to define new custom parameter, and read it from server-side Lua script:

{  
“AzureSASToken” : “SharedAccessToken …value…”,  
//…  
}

Thanks,  
Vedran

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [August 27, 2019, 7:19pm UTC](https://discourse.orthanc-server.org/t/accessing-configuration-parameter-from-server-side-lua-script/1624/2 "2019-08-27T19:19:35Z")

</div>

Hello,

You are probably looking for Lua function “GetOrthancConfiguration()”:  
[https://book.orthanc-server.com/users/lua.html#general-purpose-functions](https://book.orthanc-server.com/users/lua.html#general-purpose-functions)

HTH,  
Sébastien-

---

<div class="post-metadata">

### Author: ![Vedran\_Zdesic](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/v/a9a28c/32.png) [@Vedran\_Zdesic](https://discourse.orthanc-server.org/u/Vedran_Zdesic)
#### Post date: [August 27, 2019, 7:30pm UTC](https://discourse.orthanc-server.org/t/accessing-configuration-parameter-from-server-side-lua-script/1624/3 "2019-08-27T19:30:48Z")

</div>

Ahhh, yes! I remember that now. I will check it out …  
Thanks,  
Vedran
