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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 1 1 0

Too many requests for throttling category "Authentication", user id

The error happens when calling if (_context.SessionToken != null) return; there is no loop.

ThomsonReuters.Dss.Api.TooManyRequestsException: Too many requests for throttling category "Authentication", user id "". Approximately 408 requests were made in 300 seconds. at ThomsonReuters.Dss.Api.Core.HttpOData.Http.HttpClientExceptionDecorator.ParseResponseError(Uri uri, HttpResponseMessage response) at ThomsonReuters.Dss.Api.Core.HttpOData.Http.HttpClientExceptionDecorator.HandleExceptions(Func`1 method, Uri uri, String methodName, Boolean isIdempotent) at ThomsonReuters.Dss.Api.Core.HttpOData.Http.HttpClientExceptionDecorator.HandleExceptions(Func`1 method, Uri uri, String methodName, Boolean isIdempotent) at ThomsonReuters.Dss.Api.Core.HttpOData.Http.HttpAsyncJobStrategy.InvokeAsync(Func`2 method, Boolean pollReturnAfterHeaders, CancellationToken cancellationToken, IProgress`1 progress) at ThomsonReuters.Dss.Api.Core.HttpOData.HttpODataClient.InternalExecuteAsync(IHttpClient httpClient, Type resultEntityType, Uri uri, String httpMethod, OperationParameter[] parameters, String queryOptions, Nullable`1 waitOverride, CancellationToken cancellationToken, IProgress`1 progress) at ThomsonReuters.Dss.Api.Core.HttpOData.HttpODataClient.ExecuteAsync[T](Uri uri, String httpMethod, Boolean isSingle, OperationParameter[] parameters, String queryOptions, CancellationToken cancellationToken, IProgress`1 progress) at ThomsonReuters.Dss.Api.Core.OperationsBaseForHttpODataClient.CallOnHttpODataClient[T](DssDataServiceContext context, Func`2 method, Boolean allowAutomaticDecompression) at ThomsonReuters.Dss.Api.Core.Helper.ReAuthenticateIfNecessaryAsync[T](IDssDataServiceContext context, Func`1 method, CancellationToken cancellationToken) at ThomsonReuters.Dss.Api.Core.OperationsBaseForHttpODataClient.ExecuteAsync[T](DssDataServiceContext context, Uri uri, String httpMethod, Boolean isSingle, OperationParameter[] parameters, String queryOptions, CancellationToken cancellationToken, IProgress`1 progress) at ThomsonReuters.Dss.Core.RestApi.Threading.Tasks.AsyncHelper.RunSync[TResult](Func`1 func) at ThomsonReuters.Dss.Api.Core.OperationsBase.InvokeSynchronously[T](Func`1 action) at ThomsonReuters.Dss.Api.Core.OperationsBase.Execute[T](DssDataServiceContext context, Uri uri, String httpMethod, Boolean isSingle, OperationParameter[] parameters, String queryOptions) at ThomsonReuters.Dss.Api.DssDataServiceContext.<>c__DisplayClass12`1.<Execute>b__11() at ThomsonReuters.Dss.Api.Core.Helper.ReAuthenticateIfNecessary[T](IDssDataServiceContext context, Func`1 method) at ThomsonReuters.Dss.Api.DssDataServiceContext.Execute[TElement](Uri requestUri, String httpMethod, Boolean singleResult, OperationParameter[] operationParameters, String queryOptions) at ThomsonReuters.Dss.Api.Authentication.AuthenticationContext.RequestToken(Credentials credentials) at ThomsonReuters.Dss.Api.DssDataServiceContext.Authenticate(Uri serviceRoot, NetworkCredential networkCredential) at ThomsonReuters.Dss.Api.DssDataServiceContext.get_SessionToken() at

dss-rest-apidatascope-selectdsserror
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.

Upvotes
Accepted
32.2k 40 11 19

Hello all,

Please be updated:

A support case was opened to investigate this client report.

The conclusion was that the application was requesting token repeatedly, and that has resulted in the application being throttled.

The resolution was that in order to avoid being throttled, the application does not need to request a token repeatedly. Individual Tokens are good for 24 hours and should be reused.

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.

Upvotes
21.8k 57 14 21

Hello @Ranjith,

Nothing much is evident from the exception that you have posted. Can you please include a snippet of code, which we can run and replicate this issue. We would also like to know what version of SDK and platform you are using.

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.

We don't know when it is happening, It is intermittent issue only.

We are using below .NET SDK dlls

ThomsonReuters.Dss.Core.RestApi.Common.dll - 13.3.142.0

ThomsonReuters.Dss.RestApi.Client.dll - 13.3.142.0

C# code Snippet:

var userName = _configuration.DataScopeUser;

var userLogin = _configuration.DataScopePassword;

try

{

_searchContext = new SearchContext(dataScopeUri, userName, userLogin);

_context = new ExtractionsContext(dataScopeUri, userName, userLogin);


if (_context.SessionToken != null) return;


_context.SessionToken is creating the issue, I guess it is trying to call authentication service, but some times it is trying to call the same service 400+ times within 300 sec. There is no loop or anything it is straight forward lines of code.

Upvotes
21.8k 57 14 21

There is a newer version of SDK available, I would recommend that you upgrade and try with it.

Most likely the issue is with the user code. I have not been able to get the behavior that you see - so if you are able to replicate it, in a code sample that I can run; I can investigate it further.

Have you tried the same API calls in the DSS C# sample application? What is the result?

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.

Upvotes
78.1k 246 52 72
The application may request a token repeatedly. A token is valid for 24 hours. The application should reuse a token until it expires instead of requesting a new one for each extraction.
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.

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.