TikHub V5.0.5 更新日志
本次更新添加了鉴权的方案,目前支持以下两种携带API Token的方法:
方法一:在请求头中使用API令牌(推荐)
- 请求头:
Authorization
- 格式:
Bearer {token}
- 示例:
{"Authorization": "Bearer your_token"}
- Swagger UI: 点击页面右上角的
Authorize
按钮,直接输入API令牌,不需要Bearer
关键字。
方法二:在Cookie中使用API令牌(不推荐,仅在无法使用方法一时使用)
- Cookie:
Authorization
- 格式:
Bearer {token}
- 示例:
Authorization=Bearer your_token
获取API令牌:
- 在TikHub网站注册并登录账户。
- 进入用户中心,点击API令牌菜单,创建API令牌。
- 复制并在请求头中使用API令牌。
- 保密您的API令牌,仅在请求头中使用。
TikHub 用户
https://beta-web.tikhub.io/zh-hans/users/signin
TikHub V5.0.5 Update Log
This update adds an authentication scheme and currently supports the following two methods of carrying the API Token:
Method 1: Using the API token in the request header (recommended)
- Header:
Authorization
- Format:
Bearer {token}
- Example:
{"Authorization": "Bearer your_token"}
- Swagger UI: Click the
Authorize
button at the top right corner of the page and directly enter the API token without theBearer
keyword.
Method 2: Using the API token in a Cookie (not recommended, use only if Method 1 is not possible)
- Cookie:
Authorization
- Format:
Bearer {token}
- Example:
Authorization=Bearer your_token
Obtaining an API token:
- Register and log in to your account on the TikHub website.
- Go to the user center, click on the API token menu, and create an API token.
- Copy and use the API token in the request header.
- Keep your API token confidential and only use it in the request header.
TikHub User