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.
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 :)
Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.
Download RingCentral Phone for Desktop:
Tip: switch to the "sandbox mode" before logging in the app:
6 People are following this question.