Quick question about the screen recording api. trying to start a recording via the cli tool genesys cloud recordings start. getting a 400 bad request.
the error payload says:
{
“code”: “invalid_request”,
“message”: “Invalid recording configuration provided.”,
“errors”: [
{
“code”: “invalid_field”,
“message”: “The field ‘recording_type’ must be one of: SCREEN, AUDIO, VIDEO.”
}
]
}
i am explicitly setting recording_type to SCREEN.
here is the hcl snippet for the recording configuration:
resource “genesyscloud_recording_settings” “main” {
enabled = true
recording_type = “SCREEN”
storage_location = “default”
retention_days = 30
}
and the cli command:
genesys cloud recordings start --user-id $USER_ID --recording-type SCREEN --output-json
the cli version is 2.11.0. running on ubuntu 22.04.
i have checked the user permissions. the user has the role of admin and can start recordings manually in the ui. the manual start works fine. the screen is shared. audio is captured.
but when i run the cli command or call the api directly using curl with the same headers and body, it fails with 400.
i suspect there is a mismatch between the api schema and what the cli is sending. or maybe the screen sharing session is not active when the api call is made.
i added some debug logging. the request body looks like:
{
“recording_type”: “SCREEN”,
“user_id”: “12345”,
“start_time”: “2023-10-27T10:00:00Z”
}
the api endpoint is /api/v2/recordings.
any ideas? i am stuck. the documentation is vague about the exact format required for screen recordings initiated via api. it mostly talks about audio and video.
also, is there a way to validate the recording configuration before starting? i want to catch these errors in my terraform plan phase. currently, it only fails on apply.
thanks for any help.
edit: i also tried using the sdk. same error. so it is not a cli issue. it is an api issue.