question

Jeleicy Figueroa avatar image
Jeleicy Figueroa asked Yatin Gera Deactivated answered

sessionId or callRecordId exist

I need to check if sessionId or callRecordId is valid? is there some way I can know it?

caller id
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Yatin Gera avatar image
Yatin Gera Deactivated answered

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 :)

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

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:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys