Reputation: 21
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.
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}}"
}
}
}
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?
Upvotes: 0
Views: 1561
Reputation: 1942
The main reason for me was the region of the storage cloud (was using Amazon S3). So here are the main things to solve:
acquire
call. Forexample If i set it to AP
which means Asia Pacific.AP
in the acquire call so my bucket should be like Asia Pacific (Mumbai) ap-south-1start
call, the region must be set same as that of the bucket i.e. In my case 14 (AP-SOUTH-1)Make sure to check the documentation here for the required region: https://docs.agora.io/en/cloud-recording/cloud_recording_api_start?platform=RESTful#cloud-storage-configuration
Upvotes: 0
Reputation: 1231
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.
Upvotes: 0