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)
Best Answer
-
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.
0
Answers
-
@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.
0 -
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\"."}}
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛