Skip to content

GET /api/v1/auth/oauth/{provider}/link

GET/api/v1/auth/oauth/{provider}/link

绑定第三方账号(返回 provider 授权 URL)

useroperationId: oauthLink

请求参数

名称类型位置必填说明
providerstringpath是—

请求示例

cURL
curl -X GET 'http://localhost:8080/api/v1/auth/oauth/{provider}/link' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <JWT>'
JavaScript
const res = await fetch('http://localhost:8080/api/v1/auth/oauth/{provider}/link', {
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <JWT>'
  },
});
const data = await res.json();
Python
import requests

res = requests.get(
    'http://localhost:8080/api/v1/auth/oauth/{provider}/link',
    headers={'Accept': 'application/json', 'Authorization': 'Bearer <JWT>'}
)
print(res.json())

响应

302重定向到第三方授权页

在线调试

在线调试
凭证仅保存在当前页面内存中
自定义请求 Header