For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
5 2 9 12

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"


}


}


#technologydss-rest-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @Prathibha.Mariyappa

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@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.


1676962693174.png (51.3 KiB)
1676962724582.png (28.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you so much Jirapongse, helps a lot

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.