> 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/api-and-sdk-zh/sdk/domains-api/huan-jing.md).

# 环境

提供迷你应用正在运行的设备、应用、部署、网络、服务器时间等环境信息。

### API 列表

| API                                 | 说明                                   | 详情                                                                                                          |
| ----------------------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| `Environment.deviceId`              | 是设备唯一标识符                             | [deviceId](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.deviceid.md)                 |
| `Environment.groupId`               | 是 App in Toss 组 ID                   | [groupId](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.groupid.md)                   |
| `Environment.environment`           | 运行环境(`toss`/`sandbox`) 信息            | [environment](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.environment.md)           |
| `Environment.tossAppVersion`        | 是 Toss App 版本信息                      | [tossAppVersion](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.tossappversion.md)     |
| `Environment.deploymentId`          | 是当前部署 ID                             | [deploymentId](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.deploymentid.md)         |
| `Environment.initialURL`            | 是首次进入应用时使用的 scheme URL。              | [initialURL](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.initialurl.md)             |
| `getAppsInTossGlobals`              | 获取由宿主注入的 App in Toss 全局值             | [getAppsInTossGlobals](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/getappsintossglobals.md)     |
| `Environment.getNetworkStatus`      | 获取设备当前的网络连接状态                        | [getNetworkStatus](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.getnetworkstatus.md) |
| `Environment.getServerTime`         | 获取 Toss App 服务器当前时间，格式为 Unix 时间戳（ms） | [getServerTime](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/environment.getservertime.md)       |
| `Environment.isMinVersionSupported` | 检查当前 Toss App 版本是否高于各平台最低支持版本。       | [isMinVersionSupported](/documentation/api-and-sdk-zh/sdk/domains-api/huan-jing/isminversionsupported.md)   |


---

# 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/api-and-sdk-zh/sdk/domains-api/huan-jing.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.
