跳到文档正文
浏览和搜索
本页内容

生成 Discord 链接

生成一个 Discord 链接,对方打开后可关联 Discord 并加入 TweetStream 社区。部分结账要求先完成这一步再付款,状态查询会说明何时需要。

POST/api/agent/discord-link

授权

  • Authorizationstringheader必填使用 TweetStream API 密钥进行 Bearer 认证:Bearer <key>。

请求头

  • X-TweetStream-Setup-Proofstringheader必填邮箱验证返回的 setupProof,有效期 30 分钟。过期后需重新验证邮箱验证码。

请求体

  • familyenum<string>必填

响应字段

  • checkoutIdstring可选a string matching the pattern ^pl_[a-z0-9]{1,64}$
  • familyenum<string>必填
  • nextobject必填
    • messagestring可选a string at most 500 character(s) long
    • actionenum<string>必填
    • methodenum<string>必填
    • urlstring必填a string matching the pattern ^(https|wss):\/\/[^\s]+$
    • whoenum<string>必填
  • offerobject可选
    • amountDueNowobject必填
      • currencyenum<string>必填
      • minorstring必填a string matching the pattern ^(0|[1-9][0-9]*)$
    • modeenum<string>必填
    • planNamestring必填
    • renewalobject必填
      • amountobject必填
        • currencyenum<string>必填
        • minorstring必填a string matching the pattern ^(0|[1-9][0-9]*)$
      • atstring必填a string to be decoded into a Date
      • billingCycleenum<string>必填
      • thenAmountobject必填
        • currencyenum<string>必填
        • minorstring必填a string matching the pattern ^(0|[1-9][0-9]*)$
  • paymentUrlstring可选a string matching the pattern ^(https|wss):\/\/[^\s]+$
  • reasonenum<string>必填
  • statusenum<string>必填
  • discordobject必填
    • expiresAtstring必填a string to be decoded into a Date
    • requiredboolean必填Whether the open checkout waits for the person to join before it can be paid.
    • urlstring必填a string matching the pattern ^(https|wss):\/\/[^\s]+$

响应

  • 200成功
  • 400请求无效、验证码错误,或未接受服务条款
  • 401API key 缺失或无效,或 setup proof 缺失或已过期
  • 403账号受到限制,或请求带有外部 Origin
  • 404结账或链接不存在,或账号没有该产品的使用权
  • 429已达到速率限制或开通额度,请在 retryAfterSeconds 秒后重试
  • 503暂时不可用,请稍后重试