Welcome to the Panopto Community

Please note: All new registrants to the Panopto Community Forum must be approved by a forum moderator or admin. As such, if you navigate to a feature that is members-only, you may receive an error page if your registration has not yet been approved. We apologize for any inconvenience and are approving new members as quickly as possible.

GetSessionsById() exception if session doesn't exist anymore

edited October 2022 in API

If I call GetSessionsById() passing a sessionID (that I have stored into an external data base) of a session that doesn't exist anymore I get same exception.

"Invalid Session Id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx for user: nnnnnnnn:xxxxxxxx, at accessLevel: "The current user does not have access to call this method."

GetSessionsById() normally return the list of Sessions (IEnumerable<session>) with ID in the Guid[] array passed as parameter.

In this case (session that doesn't exist) , why the API doesn't return a list without the deleted session (or empty list if I passed just 1 Guid) but it cause an exception instead?

The only solution is to get the complete List of all existing sessions and check if my session is still present?




Best Answer

  • Options
    Joe MalmstenJoe Malmsten Panopto Employee
    Answer ✓


    After taking a look at this API call it looks like this is expected behavior for when a session is invalid. If you need further assistance with this issue please speak with your Panopto support contact and have them open a support ticket with Panopto for more information.


    Joe Malmsten


  • Options


    I found this workaround:

    I call this API GetSessionsAvailabilitySettings() instead

    It also cause an exception but at least the ex.Message is more significant:

    "The session with ID 'xxxxx-xxxxx-xx' was not found."




Sign In or Register to comment.