set_app_key handshake
Hello, after having set an app key, I am trying the python eikon package.
python 3.8.13
eikon 1.1.16
httpx 0.24.1 (putting it there as I saw that this package was of importance).
I am working behind a proxy, windows environment.
I tried to relog on / log off my eikon session and tried with a new app key but nothing happened.
I can access https://emea1.apps.cp.thomsonreuters.com/ via my web browser.
Code:
import eikon as ek
app_key = "my_app_key"
ek.set_app_key(api_key)
2023-06-12 13:11:36,517 P[26600] [MainThread 39472] Reset a Desktop session with new app_key
2023-06-12 13:11:36,561 P[26600] [MainThread 39472] Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...
2023-06-12 13:11:36,597 P[26600] [MainThread 39472] Request to http://127.0.0.1:9060/api/status
headers = {'x-tr-applicationid': 'my_app_key'}
params = None
2023-06-12 13:11:36,640 P[26600] [MainThread 39472] Checking proxy url http://127.0.0.1:9060/api/status response : 200 - {"statusCode":"ST_PROXY_READY","version":"3.3.11-eikon4"}
2023-06-12 13:11:36,673 P[26600] [MainThread 39472] Port 9060 was retrieved from .portInUse file
2023-06-12 13:11:36,706 P[26600] [MainThread 39472] Try to handshake on url http://127.0.0.1:9060/api/handshake...
2023-06-12 13:11:36,738 P[26600] [MainThread 39472] Request to http://127.0.0.1:9060/api/handshake
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'my_app_key'}
params = None
2023-06-12 13:11:51,784 P[26600] [MainThread 39472] Error on handshake url http://127.0.0.1:9060/api/handshake : ReadTimeout('')
2023-06-12 13:11:51,821 P[26600] [MainThread 39472] Error on handshake url http://127.0.0.1:9060/api/handshake : ReadTimeout('')
2023-06-12 13:11:51,854 P[26600] [MainThread 39472] Port number was not identified, cannot send any request
2023-06-12 13:11:51,883 P[26600] [MainThread 39472] Init a Desktop session with new app_key
When I look at the URL http://127.0.0.1:9060/api/handshake it returns a json with code: 404
Best Answer
-
Thank you for reaching out to us.
You can test the request by running the following command in PowerShell.
(Invoke-WebRequest -Method POST -Body (@{"AppKey"="<app key>";"AppScope"="trapi";"ApiVersion"="1";"LibraryName"="RDP Python Library";"LibraryVersion"="1.1.7"}|ConvertTo-Json) -Uri http://127.0.0.1:9060/api/handshake -ContentType application/json)
Change "<app key>" to your application key.
The response looks like this:
0
Answers
-
Thank you very much for your prompt answer!
So the code returns a code error 500 that seems to indicate I don't have access.
PS G:\> (Invoke-WebRequest -Method POST -Body (@{"AppKey"="my_app_key";"AppScope"="trapi";"ApiVersion"="1";"LibraryName"="RDP Python Library";"LibraryVersion"="1.1.7"}|ConvertTo-Json) -Uri http://127.0.0.1:9060/api/handshake -ContentType application/json)
Invoke-WebRequest : {"code":500,"message":"connect ETIMEDOUT 159.220.1.19:443","statusMessage":"Internal Server Error"}
At line:1 char:2
+ (Invoke-WebRequest -Method POST -Body (@{"AppKey"="my_app_key ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand0
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 中文论坛