发起 OAuth 流程
开始一次 OAuth 授权,返回可以跳转过去的授权 URL。接口
认证
无需认证。请求体
string
required
要使用的 OAuth 提供方名称。
响应
string
跳转过去让用户完成提供方授权的 URL。
string
用于 CSRF 防护的 OAuth state 参数。
OAuth 回调
用户在提供方完成授权后,用这个回调结束 OAuth 流程。接口
认证
无需认证。回调会用授权码换取会话并设置会话 Cookie。查询参数
string
required
OAuth 提供方返回的授权码。
string
required
OAuth 提供方返回的 state 值,用于校验请求。
响应
回调成功后设置会话 Cookie,并返回用户摘要字段。Serve 账户
查看或更新与当前 Router 用户绑定的咏唱引擎 Serve 账户。获取已绑定账户
认证
发送会话 Cookie 或Authorization: Bearer <api-key>。
响应
string
已绑定 Serve 账户的 id。
string
已绑定 Serve 账户的邮箱。
更新已绑定账户
认证
发送会话 Cookie 或Authorization: Bearer <api-key>。
请求体
string
required
要绑定的新 Serve 账户 id。