WEBSOCKET ISSUE
HI Team,
I have a client who raised a case about Websocket API, and using C# language via Windows. The client has stated:
"I’ve managed to move a step forward with WebSockets tests – using the client ID we’ve set up during our call I’m able now to authenticate on https://api.refinitiv.com:443/auth/oauth2/v1/token
And I’m getting a bearer and refresh tokens on the response.
Trying to follow the quick start tutorials, I’m required to make a service discovery call as a next step.
For this, I’m using your C# example from there
This example starts with authentication request (which works, I’m receiving the authentication tokens), but the follow up service discovery call to
https://api.refinitiv.com/streaming/pricing/v1/
fails with (403) forbidden.
This call uses the bearer token I’m getting in authentication response, which seems ok, so I have a problem understanding what I may be doing wrong."
Please assist.
Best Answer
-
Hi @cliffordmarshall.ablaza01 ,
If the authentication succeeds, but the pricing endpoints fail with 403, it implies that the user does not have the right entitlements to access this service. They need to be permissioned for RTO. Please have their account manager check/enable their credentials for right access.
The token response includes a JSON parameter called scope. The scope must include "trapi.streaming.pricing.read" as one of the scopes.
PS: This is not a DSS issue, and so I am moving it to appropriate forum.
0
Answers
-
Hi, thank you for this comment - just to clarify - I'm getting forbidden response while trying to call the service discovery endpoint at:
https://api.refinitiv.com/streaming/pricing/v1/
so I'm at the point where I haven't got an appropriate pricing endpoint yet (at least I understand the service discovery call should respond with one).
Also, in my case, the token response doesn't contain a value for the scope parameter (scope key is returned along with an empty value), in case that matters. I'm getting bearer and refresh tokens though.
0 -
Hello @mateusz.maj @cliffordmarshall.ablaza01
This seems to be a permission issue.
Could you please try to test your RTO credential with the following cURL command for the access token?
curl --location --request POST 'https://api.refinitiv.com/auth/oauth2/v1/token'; \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer ' \
--data-urlencode 'username=<Machine ID>' \
--data-urlencode 'password=<Password>' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'scope=trapi' \
--data-urlencode 'takeExclusiveSignOnControl=true' \
--data-urlencode 'client_id=<App Key>'Then copy the return access token, and then try the following cURL command for the Service Discovery Endpoint
curl --location --request GET 'https://api.refinitiv.com/streaming/pricing/v1/'; \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <access token>'Please verify if:
- The return data from the first cURL command contains scope information
- The second cURL command returns a list of endpoints
If not, I highly recommend you contact your Account Manager/Representative to verify the Machine-ID permission.
0 -
Hi @wasin.w
Thank you for commenting. I've verified what you suggested:
The return data from the first cURL command contains scope information
Yes - the return data from the first cURL command contains a list of scopes.
The second cURL command returns a list of endpoints
No - the Service Discovery request doesn't return a list of endpoints. I'm getting Forbidden response there.
So yes, it probably seems to be a permission issue.
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 中文论坛