确认 bearer token 与 X-Travelandz-Id 请求头是否解析到当前环境中有效的开发者资料和 API key。
接口
| 方法 | 路径 | 认证 |
|---|---|---|
POST | /v1/auth/check-session | 需要 API key |
| Header | 说明 |
|---|---|
Authorization | Bearer <secret_key>. The secret is shown only once when the credential is created. |
X-Travelandz-Id | <public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential. |
Content-Type | Use application/json for requests with a body. |
Request Parameters
不需要路径参数或查询参数。
请求体
不需要请求体。
成功响应
json
{
"session": {
"profileCode": "dp_a1b2c3d4e5f6"
}
}示例
bash
curl -X POST https://api.sandbox.travelandz.com/v1/auth/check-session \
-H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
-H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"