Not able to get the authentication token using curl command from Linux server
While trying to get the session token by using curl command, getting below error.
{"error":{"message":"Invalid username or password"}}
However we are able to login through GUI using same credentails. Also using SOAP UI we can request the token and get it back in response. Below is full curl command.
curl -H "Content-Type: application/json" -H "Prefer: respond-async" -X POST -d'{"Credentials": {"Username": "Your Username","Password": "Your Password"}}' https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken
Please help.
Best Answer
-
If the resolved IP is an IP of the DR site, the authentication will be failed.
The DataScope Disaster Recovery site should be accessed only upon notification of an actual failover from Thomson Reuters. Service alerts are provided to clients if a failover is invoked and also when the Disaster Recovery site is ready for client access. DataScope Service alerts can be subscribed at https://my.thomsonreuters.com/pages?name=notifications.
On Subscription Wizard, please search for Datascope Select and Thomson Reuters Tick History. Then, select the subscribed products. At least, you should select DataScope Select Service.
From historical alert, on 05-Mar-17 there was "DataScope Select - Planned Maintenance and Disaster Recovery Testing".
For more information about this testing, please refer to PCN 8868 and the attached document on that PCN (Product Change Notification).
0
Answers
-
Ayan, the account credentials (username and password) for TRTH v1 (and SOAP API) are not the same as those for TRTH v2 (and REST API).
If you have TRTH v2 credentials try them in the TRTH v2 GUI. If you can log in, then they are valid, in which case they should work in the API.
Please contact your local account manager if you do not have TRTH v2 account credentials.
0 -
Using the same credentials I can login to TRTHV2 GUI and which is valid as you have mentioned. However I am still getting the same issue while using curl command in unix. Below is the command.
curl -H "Content-Type: application/json" -k -H "Prefer: respond-async" -X POST -d'{"Credentials": {"Username": "my user id","Password": "my password"}}' https://10.xxx.xxx.xxx/RestApi/v1/Authentication/RequestToken
0 -
Also tried with below command. The below query was considered as a best answer in a question in this community.
curl -i -X POST -k -H "Content-Type: application/json" -H "Prefer: respond-async" -d "{\"Credentials\": { \"Username\": \"****\", \"Password\": \"****\"}}" https://10.xxx.xxx.xxx/RestApi/v1/Authentication/RequestToken
Output :
* About to connect() to 10.xxx.xxx.xxx port 443 (#0) * Trying 10.xxx.xxx.xxx... connected * Connected to 10.xxx.xxx.xxx (10.xxx.xxx.xxx) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * warning: ignoring value of ssl.verifyhost * skipping SSL peer certificate verification * SSL connection using TLS_RSA_WITH_RC4_128_MD5 * Server certificate: * subject: CN=hosted.datascopeapi.reuters.com,O=Thomson Reuters,L=New York,ST=New York,C=US * start date: Nov 14 00:00:00 2015 GMT * expire date: Nov 14 23:59:59 2017 GMT * common name: hosted.datascopeapi.reuters.com * issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US > POST /RestApi/v1/Authentication/RequestToken HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: 10.xxx.xxx.xxx > Accept: */* > Content-Type: application/json > Prefer: respond-async > Content-Length: 66 > < HTTP/1.1 401 Unauthorized HTTP/1.1 401 Unauthorized < Set-Cookie: DSSAPI-COOKIE=R1530954311; path=/ Set-Cookie: DSSAPI-COOKIE=R1530954311; path=/ < Cache-Control: no-cache Cache-Control: no-cache < Pragma: no-cache Pragma: no-cache < Content-Type: application/json; charset=utf-8 Content-Type: application/json; charset=utf-8 < Expires: -1 Expires: -1 < Server: Microsoft-IIS/7.5 Server: Microsoft-IIS/7.5 < WWW-Authenticate: Basic WWW-Authenticate: Basic < X-Request-Execution-Correlation-Id: 2dfdcf86-8f68-4d60-9bbf-bcf19ed7a579 X-Request-Execution-Correlation-Id: 2dfdcf86-8f68-4d60-9bbf-bcf19ed7a579 < X-App-Id: Custom.RestApi X-App-Id: Custom.RestApi < X-App-Version: 11.1.534.64 X-App-Version: 11.1.534.64 < Date: Mon, 10 Jul 2017 14:49:29 GMT Date: Mon, 10 Jul 2017 14:49:29 GMT < Content-Length: 52 Content-Length: 52 < * Connection #0 to host 10.xxx.xxx.xxx left intact * Closing connection #0 {"error":{"message":"Invalid username or password"}}
0 -
It should relate to the settings of firewall (10.xxx.xxx.xxx). Please contact the firewall admin team to verify its settings.
0 -
SCB network team verified and found there is no issues at SCB end.
0 -
@Ayan
Could you please verify what the IP address to which hosted.datascopeapi.reuters.com has been resolved on the Firewall?
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛