> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/documentation/common/permission.md).

# 권한

앱에서 클립보드, 위치 정보, 사진첩, 연락처 등의 기능을 사용하려면 권한을 설정해야 해요.\
이러한 기능들을 토스앱에서 쓸 수 있도록 권한을 설정하는 방법을 안내해요.

{% hint style="info" %}
**WebView 환경 Web API**

WebView 환경에서 일반적인 웹 API 사용은 제한하지 않아요.\
따라서 브라우저에서 사용할 수 있는 대부분의 표준 Web API를 동일하게 사용할 수 있어요.
{% endhint %}

## 권한 목록

아래는 권한 이름과 허용된 작업 목록이에요. 각 권한에 맞는 접근값도 확인해 보세요.

### 카메라

* 권한 이름: [`camera`](/documentation/common/permission/camera.md)
* 접근(`access`): openCamera

### 앨범

* 권한 이름: [`photos`](/documentation/common/permission/album.md)
* 읽기(`read`): fetchAlbumPhotos

### 클립보드

* 권한 이름: [`clipboard`](/documentation/common/permission/clipboard.md)
* 읽기(`read`): getClipboardText
* 쓰기(`write`): setClipboardText

### 연락처

* 권한 이름: [`contacts`](/documentation/common/permission/contact.md)
* 읽기(`read`): fetchContacts

### 위치

* 권한 이름: [`geolocation`](/documentation/common/permission/location.md)
* 접근(`access`): startUpdateLocation, getCurrentLocation, useGeolocation

### 마이크

* 권한 이름: `microphone`
* 접근(`access`): 추후 지원될 예정이에요. WebView라면, Web API를 이용해 직접 구현해 주세요.

## 권한 설정하기

앱에서 쓸 권한을 `granite.config.ts`에 정의할 수 있어요. 이는 앱을 검토할 때 쓰여요. [권한 목록](#권한-목록)을 참고해 설정해주세요.

아래는 클립보드와 카메라, 사진첩을 쓰도록 설정한 예시예요.

{% tabs %}
{% tab title="React Native" %}

```tsx
import { appsInToss } from '@apps-in-toss/framework/plugins';
import { defineConfig } from '@granite-js/react-native/config';

export default defineConfig({
  appName: '<my-service-name>',
  plugins: [
    appsInToss({
      permissions: [
        {
          name: 'clipboard',
          access: 'read',
        },
        {
          name: 'clipboard',
          access: 'write',
        },
        {
          name: 'camera',
          access: 'access',
        },
        {
          name: 'photos',
          access: 'read',
        },
      ],
    }),
  ],
});
```

{% endtab %}

{% tab title="WebView" %}

```tsx
import { defineConfig } from '@apps-in-toss/web-framework/config';

export default defineConfig({
  appName: '<my-service-name>', // 앱인토스 콘솔에서 설정한 앱 이름
  web: {
    /* 기존설정 */
  },
  permissions: [
    {
      name: 'clipboard',
      access: 'read',
    },
    {
      name: 'clipboard',
      access: 'write',
    },
    {
      name: 'camera',
      access: 'access',
    },
    {
      name: 'photos',
      access: 'read',
    },
  ],
});
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers-apps-in-toss.toss.im/documentation/common/permission.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
