Restriction about token for a long connection

Hi API team,

I have one question when using DSS REST Web Service API.

Is there any restriction for one token to keep a long connection to call DSS REST Web Service API? I am using GET /v1/Users/Users(UserID) to simulate heartbeat to keep token not expired. But after I run the Java client (which I implemented) for one week, it could not connect any more. I need to restart the client.

So I would like to know is there any restriction about long connection to DSS REST Web Service API? Thank you so much.

Thanks,

Jian Kang

Best Answer

  • warat.boonyanit
    Answer ✓

    Hi @jian.kang

    The tokens are valid for 24 hours and there is no need to send heartbeat to DSS server. There is no "connection" to maintain between your client and DSS.

    It is described here, but basically, you will receive a 401 (Authentication Required) status code if you try to use an expired token. You can then handle the 401 by requesting a new token and then use that token in the re-request.

Answers

  • https://community.developers.refinitiv.com/discussion/comment/39052#Comment_39052

    Thanks, Warat. But I am implementing a server side java application which will retrieve DSS data periodically. I don't want to request token every time when my downstream clients to request data from my java application. How can I do it reasonable?

  • https://community.developers.refinitiv.com/discussion/comment/39067#Comment_39067

    Hi @jian.kang

    A token is valid for 24 hours, so there are plenty of ways to handle it.

    Your server can just keep reusing it until it expires and made an authentication request when received 401.

    Or you can make it simpler and just made an authentication request every 12 hours.

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.