# Accessing Custom Plugin Settings

**URL:** https://meta.discourse.org/t/accessing-custom-plugin-settings/87930
**Category:** Development
**Created:** [May 20, 2018, 1:10pm UTC](https://meta.discourse.org/t/accessing-custom-plugin-settings/87930 "2018-05-20T13:10:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gnisha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gnisha/32/97175_2.png) [@Gnisha](https://meta.discourse.org/u/Gnisha)
#### Post date: [May 20, 2018, 1:10pm UTC](https://meta.discourse.org/t/accessing-custom-plugin-settings/87930/1 "2018-05-20T13:10:07Z")

</div>

Hello.

I’ve read some of the guides on creating your own plugins along with accessing custom plugin settings, but so far I haven’t been able to get anything to work.

So, I have the following in my `settings.yml`:

```ruby
plugins:
  twilio_sms_enabled:
    default: false
  twilio_account_sid:
  twilio_auth_token:
  twilio_from_number:

```

The fields do show up in the Admin Settings, etc.

How would I go about accesing these settings in the .hbs templates? This has been driving me crazy the past few days 😕

I’ve tried `{{{SiteSetting.twilio_account_sid}}}` and `{{{Discourse.SiteSettings.twilio_account_sid}}}` but it doesn’t display anything?

The overall purpose of the plugin I’m creating is to implement an SMS Verification system using Twilio on top of the email address verification system.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [May 21, 2018, 6:35am UTC](https://meta.discourse.org/t/accessing-custom-plugin-settings/87930/2 "2018-05-21T06:35:44Z")

</div>

To access site settings anywhere in client side (either in JavaScript code or `.hbs` templates) you have to mention it in `settings.yml` file itself like below

> <https://github.com/discourse/discourse-topic-voting/blob/main/config/settings.yml#L6>
