I'm trying to connect cloud recording from this tutorial (Agora Cloud Recording RESTful API) and getting 404 error on /v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/query request, and video not saved to AWS s3 bucket
Steps:
1 - POST: https://api.agora.io/v1/apps/86c92xxxxxxxdb3/cloud_recording/acquire
Post body raw :
{
"cname": "post39989_channel",
"uid": "206666", # <- this is uniq id in channel
"clientRequest": {}
}
receiving
{
"resourceId": "nUwxxxx....xxxxxVTXt"
}
{
"cname": "post39989_channel",
"uid": "206666", # <- this is uniq id in channel
"clientRequest": {
"recordingConfig": {
"channelType":1,
"maxIdleTime": 100,
"transcodingConfig": {
"width": 640,
"height": 480,
"fps": 30,
"bitrate": 1500,
"backgroundColor": "#fff000"
},
"subscribeVideoUids":["20"], # <- this is id of user who will stream
"subscribeAudioUids":["20"]
},
"storageConfig": {
"accessKey": "AxxxxxxY",
"secretKey": "2xxxxxxg",
"region": 0, # US East (N. Virginia) us-east-1
"bucket": "my-bucket-name",
"vendor": 1, # S3
"fileNamePrefix": [
"agoraraw"
]
}
}
}
receiving
{
"resourceId": "nUwxxxx....xxxxxVTXt",
"sid": "feexxxxxxx784c"
}
3 - on Web recieving token for streamer user (id=20)
4 - start stream (stream works)
// Create a client
this.rtc.client = AgoraRTC.createClient({mode: "live", codec: "h264",areaCode: ['GLOBAL']});
5 - during stream trying to call GET : https://api.agora.io/v1/apps/86c92xxxxxxxdb3/cloud_recording/resourceid/nUwxxxx....xxxxxVTXt/sid/feexxxxxxx784c/mode/mix/query
and get response :
{
"resourceId": "nUwxxxx....xxxxxVTXt",
"sid": "feexxxxxxx784c",
"code": 404
}
same response if call POST: https://api.agora.io/v1/apps/86c92xxxxxxxdb3/cloud_recording/resourceid/nUwxxxx....xxxxxVTXt/sid/feexxxxxxx784c/mode/mix/stop with data:
{
"cname": "post39989_channel",
"uid": "206666",
"clientRequest": {}
}
Any suggestions what I'm missing?
the uid with which you call acquire , start, stop should be a unique id which is not in channel.
check this link
Also make sure your stream is running while you call query api.