> For the complete documentation index, see [llms.txt](https://docs.opsnow.io/dev-opsnow-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opsnow.io/dev-opsnow-developer-guide/authentication.md).

# Authentication

All requests to the API require authentication.

opsnow\.io uses a Bearer token for this purpose. Include the token in the request header as follows:

```javascript
Authorization: Bearer YOUR_TOKEN_HERE
```

For security reasons, keep the access token confidential.

Avoid hardcoding it directly into the application or exposing it in client-side scripts.

### User Authentication Method

opsnow\.io issues an API key after the user authentication process during the login. Subsequently, you can obtain an access token to make API calls.

#### Step 1. Request for API Key Issuance

* Access the [opsnow360.io](https://app.opsnow360.io/settings/api-key) service and request the issuance of an API Key.
* The requested user information is verified, and an API Key will be issued

#### Step 2. Request for Access Token Issuance

* Using the API Key obtained in Step 1, request for access token issuance.
* If the request for access token issuance is processed successfully, the access token and its expiration time (3600s) are returned.

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

#### Step 3. API Call

* With the access token obtained in Step 2, you can use opsnow\.io's actual API.
* The issued access token follows the Bearer token method, explicitly stating the Bearer string and transmitting the access token.
* If the access token's validity period expires, access token reissuance is necessary.


---

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