I need to check if sessionId or callRecordId is valid? is there some way I can know it?
© 1999-2024 RingCentral, Inc. All rights reserved.
Privacy Notice
I need to check if sessionId or callRecordId is valid? is there some way I can know it?
From what I know, there is no API that can tell you if the telephonySessionId or the callRecordId is valid or not.
Instead
https://developers.ringcentral.com/api-reference/Call-Log/readUserCallRecord with an invalid callRecordId will return a 404 with a message stating callRecordId not found and
https://developers.ringcentral.com/api-reference/Call-Control/readCallSessionStatuswith an invalid telephonySessionId will return a 404
That being said, the bigger questions would be
1. What is the use case where you are getting callRecordId or telephonySessionId which you might want to validate?
2. Is it worth making API calls every time to check if these IDs are valid or is it better to have an optimistic approach and handle API failure if someone provides an incorrect ID?
If this answers your question, feel free to accept the answer :)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.