> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 접근 부여

> 특정 사용자에게 1:1 공유. 멱등.

**`PUT`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/grants/{username}`

인증: API 키 필요(`Authorization: Bearer <API Key>`). App 작성자만. 그 외 `404`.

특정 사용자에게 App 개방(멱등). `scope=shared`일 때만 유효. 부여 사용자는 상세 조회·실행 가능.

## 요청

### 경로 파라미터

<ParamField path="app_id" type="string" required>
  App 참조.
</ParamField>

<ParamField path="username" type="string" required>
  부여 대상 사용자 이름.
</ParamField>

### 요청 예시

```bash theme={null}
curl -X PUT \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/grants/dave"
```

## 응답

### 200 성공

```json theme={null}
{
  "data": {
    "ok": true
  }
}
```

페이로드는 `data`로 감쌉니다. 필드:

<ResponseField name="ok" type="boolean">
  항상 `true`.
</ResponseField>

### 오류

| HTTP | `code`         | `category`  | 설명              |
| ---- | -------------- | ----------- | --------------- |
| 401  | `unauthorized` | `forbidden` | API 키 누락 또는 무효. |

오류 응답은 `{"error": {code, category, message, retryable}}`입니다. <a href="/docs/ko/datahub/api/reference/introduction#errors">오류</a> 참고.

## 클라이언트 라이브러리

Python / JavaScript SDK는 아직 이 엔드포인트를 감싸지 않습니다. REST를 직접 호출하세요.
