Get Temporary Files Directory value from my extension
You can get any settings values from the API and, you can see how, exploring the API through http://yoursite.site/civicrm/api URL.

To answer your question you can follow this screenshot: