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.

Connection to API failing (Python)

My code is:

import requests

from oauthlib.oauth2 import BackendApplicationClient

from requests_oauthlib import OAuth2Session

# set your client ID and client secret

server = "my Panopto server"

client_id ="my client_id"

client_secret = "my client_server"

# set the token endpoint URL

token_url = 'https://'+server+'/Panopto/oauth2/connect/token'

# create a backend application client object

client = BackendApplicationClient(client_id=client_id)

# create an OAuth2 session object

oauth = OAuth2Session(client=client)

# get the access token using the client ID and client secret


   token = oauth.fetch_token(token_url=token_url, client_id=client_id, client_secret=client_secret)

except Exception:



This fails, complaining:

oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client)

I'm at a loss. I've checked the validity of client_id and client_secret.

Any suggestions?



  • Options
    Joe MalmstenJoe Malmsten Panopto Employee


    To be able to properly assist you with this issue we will need you or your support contact to please open a support ticket at support.panopto.com.


    Joe Malmsten

Sign In or Register to comment.