1. Authentication 认证
EventLightning CDP
  • Authentication 认证
    • Get access token / 获取访问令牌
      POST
  • Customers 客户
    • Get customer / 查询客户
      GET
    • Create or update customer / 创建或更新客户
      POST
  • Tags 标签
    • List or get tag groups / 查询标签组
      GET
    • Create or reuse tag group / 创建或复用标签组
      POST
    • List or get static tags / 查询静态标签
      GET
    • Create or reuse static tag / 创建或复用静态标签
      POST
    • Update static tag / 更新静态标签
      PUT
    • Delete static tag / 删除静态标签
      DELETE
  • Customer Tags 客户标签
    • Query, add, or remove customer tags / 查询、添加或移除客户标签
      POST
  • Events 客户事件
    • Create customer event / 创建客户事件
      POST
  • Related Entities 关联实体
    • Create or update related entity / 创建或更新关联实体
      POST
  • Customer Segments 客户分群
    • Query, add, or remove customer segments / 查询、添加或移除客户分群
      POST
  • 数据模型
    • OAuthToken
    • SuccessEnvelope
    • OAuthError
    • CodeResponse
    • Identification
    • CustomerDetailResponse
    • DynamicBody
    • CustomerSaveResponse
    • TagWrite
    • AudienceGroupDetail
    • CustomerSelectors
    • AudienceGroupDetailResponse
    • CustomerTagQuery
    • AudienceGroupListResponse
    • CustomerTagChange
    • TagDetail
    • CustomerSegmentQuery
    • TagDetailResponse
    • CustomerSegmentChange
    • TagListResponse
    • TagMembershipDetail
    • CustomerTagMembershipResponse
    • CustomerTagChangeResponse
    • SegmentMembershipDetail
    • CustomerSegmentMembershipResponse
    • CustomerSegmentChangeResponse
    • CustomerEventResponse
    • RelatedEntityResponse
    • ErrorEnvelope
  1. Authentication 认证

Get access token / 获取访问令牌

POST
/api/v1/oauth2/token

Purpose#

Issue an OAuth 2.0 bearer access token for a system-integration account.

Execution logic#

1.
Accepts grant_type from form or query parameters; it is required and must equal client_credentials.
2.
Authenticates the supplied client key and secret against an enabled system-integration account.
3.
Returns an access token for that account. The current token lifetime is 7,200 seconds. This flow does not issue a refresh token.
4.
Use the token as Authorization: Bearer <access_token> when calling the other /api/v1 endpoints. The account's assigned REST permissions still determine which endpoints it may call.

Option effects and errors#

Missing grant_type returns OAuth invalid_request; another grant type returns unsupported_grant_type. Invalid client credentials return an OAuth authentication error. Do not send the client secret to business endpoints and do not place credentials in logs.

中文说明#

用途#

为系统集成账号签发 OAuth 2.0 Bearer 访问令牌。

执行逻辑#

1.
从表单或查询参数读取 grant_type;该字段必填且只能是 client_credentials。
2.
使用 client key 和 client secret 认证一个已启用的系统集成账号。
3.
为该账号返回访问令牌;当前有效期为 7,200 秒,本流程不签发 refresh token。
4.
调用其他 /api/v1 接口时使用 Authorization: Bearer <access_token>;账号配置的 REST 权限仍决定它能调用哪些接口。

选项影响与错误#

缺少 grant_type 返回 OAuth invalid_request,使用其他授权类型返回 unsupported_grant_type;客户端凭据错误返回 OAuth 认证错误。client secret 不应发送给业务接口,也不应写入日志。

请求参数

Body 参数application/x-www-form-urlencoded必填

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/api/v1/oauth2/token' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=YOUR_API_KEY' \
--data-urlencode 'client_secret=YOUR_API_SECRET'

返回响应

🟢200成功
application/json
Token issued / 令牌签发成功
Bodyapplication/json

示例
{
    "access_token": "ACCESS_TOKEN",
    "expires_in": 7200,
    "token_type": "Bearer",
    "scope": "string"
}
🟠400请求有误
🟠404记录不存在
修改于 2026-09-03 22:41:37
下一页
Get customer / 查询客户
Built with