Obtaining OAUTH service account (version 2)

So I'm going to implement a websocket client to contribute to a websocket client. The first thing I need to do is to obtain an access token.
So the first problem I get at the moment is that I'm receiving a 401 Access Denied on my machine account. So I ask this as content to my request
Endpoint: "https://api.refinitiv.com/auth/oauth2/v2/token"
"grant_type", "client_credentials"
"client_id", "03c655656802455b8xxxxxxxxxxxxxxxx" <- My newly added App Key from here: https://emea1-apps.platform.refinitiv.com/apps/appkeygenerator?srv=PLNP-ERPA01
"client_secret", "{APISECRET}" <- the password for my machine account
1. Can somebody tell me what I'm doing wrong in the client_id and/or client_secret.
2. When I get the token I need to subscribe to a channel, I dont know which topic and how. I found this page but is there an official page where I can maybe figure out what I should subscibe to?
Best Answer
-
Hi @kala ,
Thank you so much for the article feedback, it'll be applied to the article soon.
And sorry for the confusion, the version 2 authentication can be used with the credentials for version 2 only and the credential you're using is for version 1.
As checked with my team, version 2 of WebSocket isn't released and ready to be used yet. In the meantime, please use the version 1 instead and I'll keep you updated when the version 2 authentication for websocket is ready.
0
Answers
-
It is referring to version 1 I can obtain a bearer token for version 1.
from the articles source version 1 - https://api.refinitiv.com:443/auth/oauth2/v1/token
0 -
Hi @kala ,
Have you had a chance to look into article Real-Time WebSocket API: Refinitiv Real-Time Optimized Version 2 Authentication Migration Guide yet?
0 -
Hi,
Thank you for your link, yes I've been looking the article thru. I find it extremely hard to understand how the input parameters should be identified, by the information I received from Refinitiv. I got no problem obtaining the version 1 access token.
Furthermore the endpoint is wrong in the article it should be https
/
API URL endpoint: http://api.refinitiv.com/auth/oauth2/v2/token (please be noticed the v2 API version)
if we go thru the parameters
- grant_type: The grant_type parameter must be set to client_credentials. <- this makes sense
- client_id: The client_id is a public identifier for apps. <- What does this mean?
- client_secret: The client_secret is a secret known only to the application and the authorization server. It is essential to have the application’s password associated with the client ID. <- is that the password received from refinitiv?
- scope (optional): Limits the scope of the generated token so that the Access token is valid only for a specific data set <- Please write which kind of options I got here, come up with an example.
So I got these two parameters from Refinitiv,
Machine account 1: {MachineAccountPassword1}
Password 1: {Password1}Created an application:
AppKey (Created application): {ApplicationKeyId}
So what do i type into client_id, client_secret and scope. It should be better explained.
grant_type: client_credentials
client_id: ???
client_secret: ???
scope: ???
0 -
OK thank you for the clarification, I can obtain the bearer token. Can you point me to a place where I can find the documentation for WebSocket version 1? I can find a lot of endpoints for each region but I don't know what is current and which channels?
0 -
Hello @kala
I highly recommend the following resources for version 1 authentication:
- RDP API - Authorization - All about tokens
- WebSocket Tutorial - Connect to Refinitiv Real-Time - Optimized
About the endpoints, there is a document in Chapter 3 of the Refinitiv Real-Time - Optimized Install and Config Guide document.
- Note: WebSocket endpoints port is 443, the endpoints with port 14002 are for RTSDK only,
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.5K 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
- 560 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
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 724 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 中文论坛