ThomsonReuters.Dss.Api.UnauthorizedException

Options
AlexL
AlexL Newcomer

I'm using the DataScope REST API toolkit for C#. On occasion when I run my application I get the following exception: ThomsonReuters.Dss.Api.UnauthorizedException: Authentication request failed because no token was provided in the Authorization: header.

When I rerun the application everything works as expected. Any ideas?

The latest toolkit, 12.3.361

The code is simplistic, it's straight out of the SDK tutorial.

_extractionsContext = new ExtractionsContext(new Uri(dssURI), dssUserName, dssUserPassword);
//create and populate the request
var result = _extractionsContext.ExtractWithNotes(request);

Best Answer

  • AlexL
    AlexL Newcomer
    Answer ✓

    What seems to have solved the issue is accessing the SessionToken and simply logging in, just like the DSS .NET API Samples. I can't begin to explain why this does the trick however.

    _extractionsContext.SessionToken

Answers