在 Agora API 中调用 start POST 调用时出错 [英] Error while calling the start POST call in Agora API

查看:67
本文介绍了在 Agora API 中调用 start POST 调用时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过他们的 对 Agora Cloud Recording API 进行 API 调用邮递员环境,但在查询和停止调用期间出现 404 错误.Acquire 调用返回一个带有 ResourceId 的 200 响应,而 start 调用也返回一个带有 sid 的 200 响应.

I am trying to make API calls to the Agora Cloud Recording API through their Postman Environment, but I am getting a 404 error during the query and stop calls. The acquire call returns a 200 response with the ResourceId and the start call also returns a 200 response with the sid.

我已从 Agora 仪表板启用了云录制功能.我还仔细检查了我的存储桶凭据.这是启动 API 主体的样子:

I have enabled Cloud Recording functions from the Agora dashboard. I have also double-checked my bucket credentials. This is what the start API body looks like:

{
    "cname":"bhavya",
    "uid":"123",
    "clientRequest":{
        "token":"{{token}}",
        "recordingConfig":{
            "maxIdleTime":120,
            "streamTypes":2,
            "audioProfile":1,
            "channelType":1,
            "videoStreamType":0,
            "transcodingConfig":{
                "width":360,
                "height":640,
                "fps":30,
                "bitrate":600,
                "mixedVideoLayout":1,
                "maxResolutionUid":"1"
                }
            },
        "storageConfig":{
            "vendor":{{Vendor}},
            "region":{{Region}},
            "bucket":"{{Bucket}}",
            "accessKey":"{{AccessKey}}",
            "secretKey":"{{SecretKey}}"
        }   
    }
} 

此外,使用他们的 交互式文档 给了我 400 个错误的请求启动步骤出错.这是收到的错误:

Moreover, using their interactive documentation gives me a 400 bad request error in the start step. This is the error received:

{
  "code": 2,
  "reason": "response detail error:2,errMsg:uid inside the List can't be convert to uint32_t!"
}

我是否在设置项目时遗漏了某些步骤?解决方案是什么?

Am I missing some step while setting up the project? What could the solution be?

推荐答案

过期/无效的令牌将返回响应 200 OK for start request 但未开始录制.所以在查询状态或调用 stop 时会抛出 404 错误,因为没有录音正在进行.

An expired/invalid token will return the response 200 OK for start request but did not start recording. So while querying status or calling stop will throw 404 error as there is no recording is going on.

在获取资源和开始记录以及所有其他需要令牌的请求时,您必须使用有效的令牌.

You must use a valid token while acquiring resource and starting recording and all other request where token is required.

另外不要忘记在请求头中添加授权令牌.

Also don't forget to add authorization token in request header.

这篇关于在 Agora API 中调用 start POST 调用时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆