认证方式

Authentication summary

EasyAPI authenticates API requests with a bearer token. Send Authorization: Bearer YOUR_API_KEY on every request; a missing, invalid, or disabled key causes authentication to fail.

Key facts

  • Every API request should include the Authorization header.
  • Disable or rotate a key immediately if it is exposed.
  • Use separate tokens for different applications or environments to limit access and track usage.

API authentication FAQ

How do I format the EasyAPI Authorization header?
Use Authorization: Bearer YOUR_API_KEY and replace YOUR_API_KEY with an active token created in the console.
Why does an EasyAPI request return 401?
Typical causes are a missing token, an invalid or disabled token, or an incorrectly formatted Bearer header.

认证方式

使用 Bearer Token 对 EasyAPI 请求进行身份验证。

认证方式

所有 API 请求均需在 Authorization 请求头中携带 Bearer Token。

请求头格式

Authorization: Bearer YOUR_API_KEY

安全建议

  1. 不要在客户端(浏览器、移动 App)中硬编码 API Key
  2. 为不同环境(开发 / 预发 / 生产)使用独立令牌
  3. 定期轮换密钥,并在控制台撤销泄露的令牌

错误响应

HTTP 状态码错误码描述
401invalid_api_key未提供或无效的 API Key
403forbidden令牌无权访问该资源

更多说明见 错误码与状态码