# 테마 컴포넌트에 API 토큰 숨기기

**URL:** <https://meta.discourse.org/t/hiding-an-api-token-in-a-theme-component/238166>\
**Category:** Support\
**Created:** [9월 5, 2022, 3:37오후 UTC](https://meta.discourse.org/t/hiding-an-api-token-in-a-theme-component/238166 "2022-09-05T15:37:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [9월 5, 2022, 3:47오후 UTC](https://meta.discourse.org/t/hiding-an-api-token-in-a-theme-component/238166/2 "2022-09-05T15:47:33Z")

</div>

네, 플러그인을 생성하고 데이터를 가져오는 컨트롤러 메서드를 정의해야 합니다.

그 다음, 프론트엔드 코드에서 컨트롤러 메서드를 호출합니다. 이 메서드는 서버 측에서 베어러 토큰을 주입하여 제3자가 접근할 수 없도록 하고, 외부 API에 호출을 수행합니다.

---

_[View the full topic](https://meta.discourse.org/t/hiding-an-api-token-in-a-theme-component/238166)._
