# Authentication

API에 대한 모든 요청은 인증이 필요합니다.

opsnow\.io는 이를 위해 Bearer 토큰을 사용합니다. 요청 헤더에 다음과 같이 토큰을 포함하십시오:

***

```javascript
Authorization: Bearer YOUR_TOKEN_HERE
```

보안상의 이유로 액세스 토큰을 비밀로 유지하십시오.

애플리케이션에 직접 하드코딩하거나 클라이언트 측 스크립트에 노출하지 마십시오.

### 사용자 인증 방법

opsnow\.io는 로그인 중 사용자 인증 프로세스 후 API 키를 발급합니다. 이후 API 호출을 위해 액세스 토큰을 얻을 수 있습니다.

#### Step 1. API 키 발급 요청

* [opsnow360.io](https://app.kr.opsnow360.io/settings/api-key) 서비스에 접속하여 API 키 발급을 요청하십시오.
* 요청된 사용자 정보가 확인되면 API 키가 발급됩니다.

#### Step 2. 액세스 토큰 발급 요청

* Step 1에서 얻은 API 키를 사용하여 액세스 토큰 발급을 요청하십시오.
* 액세스 토큰 발급 요청이 성공적으로 처리되면 액세스 토큰과 만료 시간(3600초)이 반환됩니다.

```sh
curl -X POST "https://api.kr.opsnow360.io/platform/v2/identity/api-keys/token" \
-H "Content-Type: application/json" \
-d '{"apiKey":"YOUR_API_KEY"}'
```

#### Step 3. API 호출

* Step 2에서 얻은 액세스 토큰을 사용하여 opsnow\.io의 실제 API를 사용할 수 있습니다.
* 발급된 액세스 토큰은 Bearer 토큰 방식을 따르며, Bearer 문자열을 명시적으로 표시하고 액세스 토큰을 전송합니다.
* 액세스 토큰의 유효 기간이 만료되면 액세스 토큰을 다시 발급받아야 합니다.


---

# Agent Instructions: 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://docs.opsnow.io/dev-opsnow-developer-guide-kr/authentication.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.
