Data contribution using Websocket API in Python: authentication
Hi !
I would like to use the Websocket API via Python to contribute data to Refinitiv.
I'm on Windows and I have a Workspace licence.
My account manager told me that I'm autorized to contribute to the UAT/dev environement.
I'm using websocket_authentication_argp.py from the tutorial/download page regarding the Websocket API
The problem is that I'm not sure what credential use to connect to the gateway and then to the websocket
Should I use the credentials I have to loggin to Workspace ? (username/password) what about client_id ?
Should I create an API Key using the APP Key generator in Workspace ?
Many thanks for your help
Best Answer
-
As far as I know, the username for RCC connections should be a machine ID, such as GEXXXX.
I am not sure that you can use Workspace credentials to connect to RCC.
You can contact your Refinitiv account team to verify the permission.
Otherwise, you can contact the Refinitiv Contributions Channel support team directly via MyRefinitiv to verify your RCC credentials.
0
Answers
-
I was able to connect to the RDP Auth Gateway Production (https://api.refinitiv.com:443/auth/oauth2/v1/token) using user/password (Workspace credentials) and an EDP API Key created using APP Key generator as client_id (40 characters)
For ws address i'm using contrib-ws1-emea1.uat.platform.refinitiv.com which seems to be the ws dev/uat environment, but it seems the login fails
Any idea why ?
Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token ...
RDP-API Gateway Authentication succeeded. RECEIVED:
{
"access_token":"eyJ0eXAi<censored>",
"expires_in":"600",
"refresh_token":"f2472f04-4b<censored>",
"scope":"",
"token_type":"Bearer"
}
Connecting to WebSocket wss://contrib-ws1-emea1.uat.platform.refinitiv.com:443/WebSocket ... - Attempt: 1
WebSocket successfully connected!
SENT:
{
"Domain":"Login",
"ID":1,
"Key":{
"Elements":{
"ApplicationId":"256",
"AuthenticationToken":"eyJ0eXAiOiJh<censored>",
"Position":"<censored>"
},
"NameType":"AuthnToken"
}
}
RECEIVED:
[
{
"Domain":"Login",
"ID":1,
"Private":true,
"State":{
"Code":"AppAuthorizationFailed",
"Data":"Suspect",
"Stream":"Closed",
"Text":"Authentication unsuccessful"
},
"Type":"Status"
}
]
Login failed.
0 -
Hello @jean-hugues.lasbatre
I am assuming that you are trying to contribute your market data to LSEG (Refinitiv) via the Refinitiv Contribution Channel (RCC) directly (without RTDS).
If so, please be informed that your need the RCC credential to access to RCC/RDP. The Workspace and RCC are different product which require different credential and permissions set.
I strongly suggest you check the Contributing Data to Refinitiv Contributions Channel (RCC) via WebSocket tutorial Prerequisites section about the requirements.
If your company has Real-Time Distribution System (RTDS), you can ask your market data team to set the RTDS to connect to RCC (require RCC credential), then you can contribute data to RCC via that RTDS as well.
0 -
Hi @wasin.w
Thanks for the update
I've followed the tutorial and was able to connect to the RDP Auth Gateway Production (https://api.refinitiv.com:443/auth/oauth2/v1/token) ; I tried using the Pre-Production but the access was denied. for user/password I used my Workspace credentials.
For client_id I created a EDP API Key using the generator in Workspace (40 character id).
Regarding the ws address I tried to connect to what seems to be the UAT/dev environment (contrib-ws1-emea1.uat.platform.refinitiv.com) but the login failed ; any idea why ?
Please find below the session log
Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token ...
RDP-API Gateway Authentication succeeded. RECEIVED:
{
"access_token":"eyJ0eXAi<censored>",
"expires_in":"600",
"refresh_token":"f29eeffd-d<censored>",
"scope":"",
"token_type":"Bearer"
}
Connecting to WebSocket wss://contrib-ws1-emea1.uat.platform.refinitiv.com:443/WebSocket ... - Attempt: 1
WebSocket successfully connected!
SENT:
{
"Domain":"Login",
"ID":1,
"Key":{
"Elements":{
"ApplicationId":"256",
"AuthenticationToken":"eyJ0eXAiOiJh<censored>",
"Position":"<censored>"
},
"NameType":"AuthnToken"
}
}
RECEIVED:
[
{
"Domain":"Login",
"ID":1,
"Private":true,
"State":{
"Code":"AppAuthorizationFailed",
"Data":"Suspect",
"Stream":"Closed",
"Text":"Authentication unsuccessful"
},
"Type":"Status"
}
]
Login failed.
1
on_close() takes 1 positional argument but 3 were given
0 -
Hi @Jirapongse
Thanks for the update, after they provided me with machine ID I was able to connect to RCC
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 中文论坛