Starting the CIAM migration process using Python

We just learned about the need to upgrade to V2 authentication. We have generated a service account, and have a key. The next step is to ?replace? our existing Python client.
I assume we should be using the library here
Thank you.
Answers
-
Thank you for reaching out to us.
If you directly a WebSocket API to retrieve real-time data from Real-Time Optimized, you can refer to the Real-Time WebSocket API: The Real-Time Optimized Version 2 Authentication Migration Guide article.
If you would like to use LSEG Data Library, you can use the following configurations in the lseg-data.config.json file.
}, "sessions": { "default": "platform.ldp", "platform": { "ldp": { "client_id": "<Client_ID>", "client_secret": "<Client_Secret>", "app-key": "<App Key>" },
Then, I tested it with the EX-3.02.01-OMMStream-MarketPrice.ipynb example on GitHub.
0 -
Thank you for the quick reply.
I am not using a jupiter notebook environment, I am using Python3.12 in docker (3.12.7-alpine3.20). Reading the examples (https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/RDP/python), I assume the
<clientId>
mentioned in the docs is actually the service id from the "LSEG Platform Administration page" (https://platformadmin.refinitiv.com/Apps/platform-administration/)
Is there an extra step required before I can use the Application ID and the generated secret?
Thank youHere is my session:
python3 market_price_rdpgw_client_cred_auth.py --clientid GE-N7RX5UH7R24U --clientsecret <deleted>
2024-11-29 16:42:02.219747 Sending authentication request with client credentials to https://api.refinitiv.com/auth/oauth2/v2/token ...
Refinitiv Data Platform authentication HTTP code: 401 Unauthorized
Unrecoverable error: stopped retrying request
Failed initial authentication with Refinitiv Data Platform. Exiting...
0 -
Hello @kyle
The examples on Refinitiv/websocket-api Github repository are for the core . An application needs to handle everything (connection management, ping-pong message, subscription management, etc.) by itself.
On the other hand, the https://github.com/LSEG-API-Samples/Example.DataLibrary.Python GitHub, but you can use it with a console application inside Docker.
is the ease-of-use library that build on top of the WebSocket API. It can be used with any types of applications such as console application, Jupyter Notebook, back-end service, etc. We just provide examples as the Jupyter Notebook for developers on theAbout your "I assume the
<clientId>
mentioned in the docs is actually the service id from the "LSEG Platform Administration page" (https://platformadmin.refinitiv.com/Apps/platform-administration/)" message, it is correct. The service id is the client-id.Back to the issue, the following message indicates that your credential does not have a permission to the authorize with the RDP Login service which is required by the RTO.
2024-11-29 16:42:02.219747 Sending authentication request with client credentials to https://api.refinitiv.com/auth/oauth2/v2/token ...
Refinitiv Data Platform authentication HTTP code: 401 Unauthorized
You can verify your RTO credential with the following cURL command:
curl -X POST \
'https://api.refinitiv.com:443/auth/oauth2/v2/token' \
--header 'Accept: */*' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_secret={client secret}' \
--data-urlencode 'client_id={client id}' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=trapi'I strongly suggest you contact your LSEG representative or Account manager to help you with this permission issue. It cannot be fixed programmatically.
0 -
Thank you very much for he curl command. I am able to get an access_token.
{ "expires_in":7199, "token_type":"Bearer", "access_token":"deleted"}
I have contacted my Account manager to continue this conversion. My next step is to step through your client library with the debugger to figure out why market_price_rdpgw_client_cred_auth.py does not work.
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
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 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
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛