Reputation: 161
I need cloud recording in agoraIO via API. I have successfully got the responseId and by this responseId I have successfully start the could recording and got sid with 200 status code. But When I call the stop() function it is showing error code:435. I have AWS3 account and input accessKey and accesSecrete. I have created bucket also. I have little but confused about bucket. I have added the AWS3's access. Is it the bucket name only or anything else? I appreciate any clue or modification.
Url: https://api.agora.io/v1/apps/#APPID#/cloud_recording/resourceid/#RecordingResponseId#/mode/mix/start
<cfset json_request_recording_start= {
"uid": "#uid#",
"cname": "#mychannel#",
"clientRequest": {
"token": "",
"recordingConfig": {
"maxIdleTime": 30,
"streamTypes": 2,
"audioProfile": 1,
"channelType": 0,
"videoStreamType": 1,
"transcodingConfig": {
"height": 640,
"width": 360,
"bitrate": 500,
"fps": 15,
"mixedVideoLayout": 1,
"backgroundColor": "##FF0000"
}
},
"storageConfig": {
"accessKey": "#accessKey#",
"region": 3,
"bucket": "#awsbucket#",
"secretKey": "#secretKey#",
"vendor": 2
}
}
}>
Server Response
{
"resourceId":"fgfdfgfgfgfgfgf",
"sid":"ff4trtrtrgfgfgfgf7825c4a81d9a2e33",
"code":435,
"serverResponse":{
"fileList":"",
"uploadingStatus": "unknow"
}
}
Upvotes: 3
Views: 1437
Reputation: 2889
I got it working.
in my case the issue was because I was testing the recording just using APIs and not passing in any data from mobile/web to agora using agora client SDKs. that's why nothing get recorded and status always remained unknown.
After passing the data, recording worked as expected.
Also for additional debugging you can write Agora support to enable callback events, this way you can see all the events happening on agora side.
Upvotes: 2
Reputation: 2898
The Body of your start request should look like this
{
"cname":"{{AccessChannel}}",
"uid":"{{RecordingUID}}",
"clientRequest":{
"recordingConfig":{
"maxIdleTime":120,
"streamTypes":2,
"audioProfile":1,
"channelType":1,
"videoStreamType":0,
"transcodingConfig":{
"width":360,
"height":640,
"fps":24,
"bitrate":800,
"mixedVideoLayout":1,
"maxResolutionUid":"1"
}
},
"storageConfig":{
"vendor":{{StorageVendor}},
"region":{{StorageRegion}},
"bucket":"{{Bucket}}",
"accessKey":"{{AccessKey}}",
"secretKey":"{{SecretKey}}"
}
}
}
Agora has a Postman collection that makes setup easier to understand: https://documenter.getpostman.com/view/6319646/SVSLr9AM?version=latest
Upvotes: -1