# 身份验证

> Authenticate Triggers Admin API requests using Service Account credentials.

Scheduling 和 Triggers Admin API 都只接受经过身份验证的请求。只有[服务帐户身份验证](https://services.docs.unity.com/docs/service-account-auth/)才能对这些服务进行身份验证。

## 对玩家进行身份验证##authenticate-players

Scheduler 和 Trigger API 目前不支持玩家身份验证。

## 对受信任的客户端进行身份验证（基本身份验证）##authenticating-trusted-clients-basic-authentication

您可以将 Scheduler 和 Trigger API 与[服务帐户身份验证](https://services.docs.unity.com/docs/service-account-auth/)结合使用。

要访问 [Triggers Admin API](https://services.docs.unity.com/triggers-admin/v1/) 和 [Scheduler Admin API](https://services.docs.unity.com/scheduler-admin/v1/)，请使用[基本身份验证](https://services.docs.unity.com/docs/service-account-auth/#using-service-account-credentials)。您可以对 `<KEY_ID>:<SECRET_KEY>` 进行 base64 编码来直接使用服务帐户凭据。

使用前需要向服务帐户授予适当的权限。

请参阅下表了解适用于 Triggers 的角色。

| 访问权限        | 角色                                                                                                                                        |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| 读取触发器       | [Triggers Configuration Viewer（Triggers 配置查看者）](https://services.docs.unity.com/docs/service-account-auth#triggers-configurations-viewer) |
| 读取/写入/删除触发器 | [Triggers Configuration Editor（Triggers 配置编辑者）](https://services.docs.unity.com/docs/service-account-auth#triggers-configuration-editor)  |

请参阅下表了解适用于 Scheduler 的角色。

| 访问权限       | 角色                                                                                                                                           |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| 读取计划       | [Scheduler Configuration Viewer（Scheduler 配置查看者）](https://services.docs.unity.com/docs/service-account-auth#scheduler-configurations-viewer) |
| 读取/写入/删除计划 | [Scheduler Configuration Editor（Scheduler 配置编辑者）](https://services.docs.unity.com/docs/service-account-auth#scheduler-configuration-editor)  |

请参阅[服务帐户身份验证](https://services.docs.unity.com/docs/service-account-auth/)以了解更多信息。
