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.

Getting access token for a Server Application - Invalid client

edited June 2021 in API

Hi,

I have followed the instructions in the link https://support.panopto.com/s/article/oauth2-for-services for Server application using client credentials.

In postman i tried a POST request to the Panopto Oauth2 token endpoint.  https://<server>/Panopto/oauth2/connect/token with request payload type as Url encoded and the key value as following grant_type as “client_credentials” and the scope as “api”.

In the header have added the Key as Authorization and value as "Basic Base64Encoded(<ClientId>:<ClientSecretValue>)". The client Id used to construct the auth token here is a guid I see in the api key on panopto portal.

I am getting 400 response with below error.

{

    "error": "invalid_clent"

}


Request Headers

Authorization: Basic Base64Encoded(<ClientId>:<ClientSecretValue>)

User-Agent: PostmanRuntime/7.28.0

Accept: */*

Postman-Token: e6213c63-cb1f-*******-******-***********

Host: ****.hosted.panopto.com

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

Content-Type: application/x-www-form-urlencoded

Content-Length: 39


Request Body

  1. scope: "api"
  2. grant_type: "client_credentials"


Answers

  • Kevin BaumKevin Baum Panopto Employee

    Hi Akash,

    I was able to look into this for you on our end, and it looks like the root error is an invalid client secret value. Can you please double-check that you are sending the correct client secret value in the Authorization header?

    If you are unsure if the secret is correct or have lost the original client secret value, you can generate a new one by opening the API Client menu (System->API Clients), find the API client you are using, and click on the client name to edit that client. A pop-up window will open with the client details. Click on the Generate button to generate a new secret value, copy and save it somewhere locally, and then click on the Save button to save the new client secret. Once you have generated and saved the new client secret, please try updating your Postman request with the new secret and see if that works.

    Please let me know if you have any other questions, or if you still continue to see this error after generating a new client secret value.

    Thank you,

    Kevin

  • Hi Kevin,


    I did check that multiple times and tried to make call with new generated secret from the portal still getting the same error.

  • Kevin BaumKevin Baum Panopto Employee

    Hi Akash,

    Thank you for the quick reply. If you've already tried using a new client secret, then I will likely need some additional information from you on this. Can you please contact your Panopto Sales Engineer and ask them to open a ticket on your behalf so I can continue to look into this further for you?

    Thank you,

    Kevin

Sign In or Register to comment.