开放平台WebAPI V4.3.0
  1. TOKEN
开放平台WebAPI V4.3.0
  • 接口概览
  • 错误码
  • TOKEN
    • AK/SK获取TOKEN
      POST
    • 刷新TOKEN
      POST
  • 文件服务
    • 上传音频文件
      POST
    • 下载音频文件
      POST
  • 声纹库管理
    • 新建声纹库
      POST
    • 修改声纹库
      POST
    • 删除声纹库
      POST
    • 查看声纹库列表
      POST
  • 特征管理
    • 查询声纹是否存在
      POST
    • 注册声纹
      POST
    • 更新声纹
      POST
    • 删除声纹
      POST
    • 移动声纹
      POST
    • 获取声纹列表
      POST
  • 声纹比对
    • 声纹确认(文件比特征)
      POST
    • 声纹确认(文件比文件)
      POST
    • 声纹辨认
      POST
    • 声纹聚类
      POST
    • 声纹聚类结果查询
      POST
    • 获取提示文本
      POST
    • 检测提示文本
      POST
  • 语音拓展
    • 年龄识别
      POST
    • 人声分割
      POST
  • 语音识别
    • 录音文件转写
    • 查询转写结果
  1. TOKEN

AK/SK获取TOKEN

POST
/openai/v1/oauth/token
V4.0
1.timestamp必须与服务器系统时间误差小于1分钟。
2.signature签名过程。
1)将除signature以外的参数名进行【ASCLL码】排序后拼接格式如下。(选填参数若有值也参与计算,无值则不参与)
key1=value1&key2=value2&key3=value3
2)将AppSecret作为秘钥进行HMACSHA256算法签名)。

请求参数

Body 参数application/json
algorithm
string 
必需
签名算法,目前仅支持HMACSHA256
appId
string 
应用ID
必需
nonce
string 
6位随机数
必需
signature
string 
必需
签名,详细规则看接口备注
timestamp
string 
必需
当前时间,13位时间戳
示例
{
    "algorithm": "string",
    "appId": "string",
    "nonce": "string",
    "signature": "string",
    "timestamp": "string"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/openai/v1/oauth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "algorithm": "string",
    "appId": "string",
    "nonce": "string",
    "signature": "string",
    "timestamp": "string"
}'

返回响应

🟢200成功
application/json
Body
code
integer 
错误码 0代表成功
必需
msg
string 
错误消息
必需
rid
string 
交易请求唯一标识
必需
data
object  | null 
返回数据
可选
token
string 
业务Token
必需
expire
integer 
必需
到期时间,13位时间戳
示例
{
    "code": 0,
    "msg": "string",
    "rid": "string",
    "data": {
        "token": "string",
        "expire": 0
    }
}
上一页
错误码
下一页
刷新TOKEN
Built with