Endpoints挑战

创建家长邀请挑战

创建绑定到 `sessionId` 的家长邀请挑战,并向 `parentEmail` 发送邀请邮件。仅适用于无需家长同意、且会话尚未与家长关联的玩家;其他会话会被拒绝(见下方错误码)。通过(PASS)时会触发携带同一 `sessionId` 的 `Challenge.StateChange`,便于将结果与本次邀请对应起来。

POST
/challenge/invite-parent
AuthorizationBearer <token>

In: header

Request Body

application/json

Invite parent request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/challenge/invite-parent" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",    "parentEmail": "parent@example.com",    "playerName": "Alex",    "locale": "en"  }'
{  "status": "CHALLENGE",  "challenge": {    "challengeId": "ae6d4729-af32-42ea-8ef2-ff46c7664802",    "type": "CHALLENGE_PARENT_INVITE"  }}