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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 2 2

Error: Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken

I am getting the below error while trying to get token from DSS REST API, Even after using verify = False , I am getting the same error

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='hosted.datascopeapi.reuters.com', port=443): Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f29d510f820>: Failed to establish a new connection: [Errno -2] Name or service not known'))


Code Used:

import requests, json
from requests import Request, Session
from collections import OrderedDict


urlGetToken = 'https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken'
header1 = {'Content-Type': 'application/json'}
tokenRequestBody = json.dumps({'Credentials': {'Password': '*****', 'Username': '*******'}})
response = requests.post(urlGetToken, tokenRequestBody, headers = header1, verify=False)
statusCode = response.status_code
if statusCode != 200:
print('ERROR: Get Token failed with HTTP status code: ' + str(statusCode))

else:
result = response.json()
token = result['value']
print(token)

dss-rest-apidatascope-selectdssauthenticationextractionurl
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 @prakash.balusamy

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

Upvotes
Accepted
32.2k 40 11 20

Hello @prakash.balusamy,

Looks like you are not reaching DSS endpoint.

Usually, this happens when one is running from behind a firewall and requires to use a proxy to connect.

You may find this discussion to be relevant.

You may be using proxy settings in other applications connecting to external destinations from the same machine, allowing you to reuse the same settings. Or may need to find out the appropriate proxy settings from your organization's network admin/group.

Let us know how this suggestion works for you, if you are able to make progress.

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 @prakash.balusamy,

Were you able to reach the endpoint?

Now I can able to get access the DSS URL, whom do I need to check to get permission for template as below?

10:19:30=== Exception occrued: Error: Status Code:403 Message:{"error":{"message":"No permission for template \"IntradayPricingReportTemplate\"."}}

Hello @prakash.balusamy,

Looks like you are now reaching the endpoint, however, you are not permissioned for IntradayPricing that you are requesting.

Suggest you contact your Refinitiv account management team, to confirm what instrument sets, and what request types your DSS id is permissioned for.

Please let us know if you are able to proceed.

Upvotes
22k 59 14 21

@prakash.balusamy, are you able to reach the DSS website - https://hosted.datascopeapi.reuters.com/DatascopeApi in the browser. If yes, you can check the browser settings to see if it is configured to use proxy server.

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.