Automate Token generation in DataScope Select

Hi All,


Need your advice on process of automating DSS Token generation.


As token is valid for 24 hours only, new token should be manually generted.

Please advice if there is a way to automate Token Generation.

When checking I found the below


(err, res) => {
// Set BEARERTOKEN
pm.globals.set("BEARERTOKEN", res.json().access_token)
// console.log(res.json());


Please advice how to include the above in below code


{


"Credentials": {


"Username": "DSS ID ",


"Password": " DSS PSwd"


}


}


Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Prathibha.Mariyappa

    Thanks for reaching out to us.

    The script looks like to be a Postman script used to set a retrieved token to a Postman environment variable.

    As I know, the DSS REST API itself doesn't provide this feature. To get a new token, the client needs to send a request to the Authentication/RequestToken endpoint. The Automate Token generation should be implemented in the client application or library, not in the DSS REST API.

    Instead of using a token, you can use a basic authentication by specifying a DSS credential in the header of an HTTP request message.

    1676962693174.png

    The request message looks like this:

    1676962724582.png


    I hope that this information is of help.

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.