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.

API and Postman

edited October 2022 in API

Hi!

Trying to get into API and was trying to follow the recipe for logging in with Postman - but I can't quite get it. Created an API-client and with the ID and secret I can reach out but I get the error "unauthorized_client". What did I do wrong?

Answers

  • Hi Jens,

    I suspect your issue may have to do with the type of authorisation you have used to negotiate the token. I have used a User-based Server Application both when using programming languages to make REST calls as well as in Postman.

    You need the app client key and secret, and a set of admin credentials.

    To make the job easier for you, I have attached a Postman collection export (any sensitive data has been redacted, hopefully). It sets the required variables in the environment and uses a pre-request script to generate the token, which is then used automatically

    in all subsequent requests.

    I hope it helps

    Regards

    Cristiano

  • edited October 2022

    It helped so far that i get connected now - but obviously there is no token in the response:


  • That's strange. The way it works for me is pretty simple: the pre-request script in the Collection tab uses the constants defined in the Environment to generate a token and set it as an environment variable; since it's a pre-request script, it's executed every time you open the Collection, so that the other requests should be able to access it as {{token}}

    In the environment, the value of the BasicAuth is the key:secret string in Base64, the rest is self-explanatory

    I just open one of the sample requests, set any parameters or query strings required, and the requests returns valid JSON

    Sorry I can't help you further

    C.

  • Joe MalmstenJoe Malmsten Panopto Employee

    Hi,


    Please read the following documentation for steps on how to create an access token for use with Postman and the Panopto REST API. (https://support.panopto.com/s/article/How-to-use-Postman-with-the-Panopto-REST-API). There are steps in this documentation that detail how to create an access token for use with Postman.

    Please feel free to ask if you have any other problems or questions.


    Thanks,

    Joe Malmsten

  • HI!


    That was what i was doing (as i wrote earlier)!! But still i did not get it working!


    Jens

  • Joe MalmstenJoe Malmsten Panopto Employee

    Hi,


    If you have tried the steps on the document and it still is not working for you then I would ask you have your POC make a support ticket at support.panopto.com so we can provide you better assistance.


    Thanks,

    Joe Malmsten

  • Hi all,

    Same problem here with these collection. Can't found token in the response

    Regards

Sign In or Register to comment.