I have a webhook that takes in events from /account/~/telephony/sessions. After a call is started, the following events comes in:
{
'uuid': '7797363007370040051',
'event': '/restapi/v1.0/account/2372180004/extension/2372180004/telephony/sessions', 'timestamp': '2023-11-24T21:54:12.910Z',
'subscriptionId': '0cdd42b0-8039-425c-bdc2-be66d53c25c7',
'ownerId': '2372180004',
'body': {
'sequence': 7,
'sessionId': '972044820005',
'telephonySessionId': 's-a0e174f191008z18c03535d88za351b10000',
'serverId': '10.14.23.79.TAM',
'eventTime': '2023-11-24T21:54:12.842Z',
'parties': [
{
'accountId': '2372180004',
'extensionId': '2372180004',
'id': 'p-a0e174f191008z18c03535d88za351b10000-2',
'direction': 'Inbound',
'to': {
'phoneNumber': [number],
'name': [name],
'extensionId': '2372180004'
}, 'from': {
'phoneNumber': [number],
'name': [name]
}, 'recordings': [{
'id': '2410992944005',
'active': True
}], 'status': {
'code': 'Answered',
'rcc': False
},
'park': {},
'missedCall': False,
'standAlone': False,
'muted': False
}],
'origin': {'type': 'Call'}
}}
While the call the still active, I shortly made the request:
curl --request PATCH
--url 'https://platform.ringcentral.com/restapi/v1.0/account/~/telephony/sessions/s-a0e174f191008z18c03535d88za351b10000/parties/p-a0e174f191008z18c03535d88za351b10000-2/recordings/2410992944005?brandId=~'
--header 'accept: application/json'
--header 'authorization: Bearer [MY-BEARER-TOKEN]'
--header 'content-type: application/json'
--data '{"active":true}'
In which I am getting an Error code 400 response. I need help understanding why I would be getting this error, and what to do to resolve it. I made the same request where active was equal to false.