> For the complete documentation index, see [llms.txt](https://meetgo.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://meetgo.gitbook.io/api/member/permission.md).

# permission

## For Frontend

유저 정보와 함께 API를 요청할 경우, **헤더**에 토큰 정보를 포함해 요청합니다.

```
Authorization:Token a48d7daa206881756db5a832c467441d24ed15b8
```

인증을 성공하지 못하거나 권한이 없을 경우, 응답은 다음과 같습니다.

```javascript
// 헤더에 Authorization이 없는 경우, 401 Unauthorized
{
    "detail": "Authentication credentials were not provided."
}

// 토큰 값이 유효하지 않은 경우, 401 Unauthorized
{
    "detail": "Invalid token."
}

// 이메일 인증을 하지 않은 유저일 경우, 403 Forbidden
{
    "detail": "You do not have permission to perform this action."
}
```

## For Backend

이메일 인증하지 **않은** 유저에게 권한을 주기 위해서는 다음과 같이 사용합니다.

```python
from rest_framework.views import APIView
from rest_framework.permissions import IsAuthenticated

class Test(APIView):
    permission_classes = (IsAuthenticated, )
    # ...
```

**이메일 인증을 완료**한 유저에게 권한을 주기 위해서는 다음과 같이 사용합니다.

```python
from rest_framework.views import APIView
from member.permissions import UserPermission

class Test(APIView):
    permission_classes = (UserPermission, )
    # ...
```


---

# 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:

```
GET https://meetgo.gitbook.io/api/member/permission.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
