Error in Using custom addresses for tokenServiceUrlV1 and tokenServiceUrlV2

Hi,
I used custom addresses for tokenServiceUrlV1 and tokenServiceUrlV2. I get following error. Can i know exactly what this error means ? Wrong credentials ?
loggerMsg
TimeStamp: 08:46:48.544
ClientName: ChannelCallbackClient
Severity: Error
Text: Failed to add RsslChannel(s) to RsslReactor. Channel name(s) Channel_1Channel_1Channel_2
Instance Name Consumer_1_10
RsslReactor 0x0x7f498396fbf0
RsslChannel 0
Error Id -1
Internal sysError 0
Error Location /home/ec2-user/Real-Time-SDK/Cpp-C/Eta/Impl/Reactor/rsslReactor.c:11899
Error Text Failed to request authentication token information with HTTP error 400. Text: {"error":{"id":"bbdc829e-9e1a-4382-9e02-ea1872e65329","code":"400","message":"Valida
tion error","status":"Bad Request","errors":[{"key":"requestBody","reason":"Error at \"/grant_type\": value is not one of the allowed values [\"client_credentials\"]"}]}}
loggerMsgEnd
Best Answer
-
Thanks for reaching out to us.
You may use the incorrect endpoint. There are two versions of the authentication endpoints.
- Version 1: http://api.refinitiv.com/auth/oauth2/v1/
- Version 2: http://api.refinitiv.com/auth/oauth2/v2/
The authentication version 1 uses a machine Account (username, password, and App-Key) and supports password and refresh grant types. The authentication version 2 uses a service account (Client ID and Client Secret) and supports the client credentials grant type.
According to the error, I assume that you have a machine account for version 1 but you connect to the authentication version 2 endpoint.
Please check your credential if it is a machine account or a service account. If it is a machine account, use the authentication version 1 endpoint (tokenServiceUrlV1). If it is a service account, use the authentication version 2 endpoint (tokenServiceUrlV2).
For more information, please refer to the Getting Started with Version 2 Authentication for Refinitiv Real-Time: Overview article.
I hope that this information is of help.
0
Answers
-
Hello @thilinaillangasinghe
I am sorry to hear that you are facing the issue. To let me understand the problem better, please give me the following information.
- a version of EMA C++
- OS, platform information
- Which type of RTO credentials? Is it a Machine ID (GE-A-XXXXXXX-X-XXXX) or Service Account ID (GE-XXXXXXX)
- The snippet code that set the custom URL, set credentials (config.consumerName(...) and serviceDiscovery.registerClient(...))
I recommend you try the Cons450 example and see if the problem still persists.
If you are using a Machine ID account, the code needs to set RTO credentials with username (Machine ID), password, and App Key (aka client_id_v1):
serviceDiscovery.registerClient( ServiceEndpointDiscoveryOption().username( userName ).password( password )
.clientId( clientId ).transport( transportProtocol ).takeExclusiveSignOnControl( takeExclusiveSignOnControl ), client );
config.consumerName( "Consumer_1" ).username( userName ).password( password )
.clientId( clientId ).config( configDb ).takeExclusiveSignOnControl( takeExclusiveSignOnControl );If you are using the Service Account ID, the code needs to set RTO credentials with client id and client secret:
serviceDiscovery.registerClient( ServiceEndpointDiscoveryOption().clientId( clientId ).clientSecret( clientSecret )
.transport( transportProtocol ), client );
config.consumerName( "Consumer_1" ).clientId( clientId ).clientSecret( clientSecret )
.config( configDb );0 -
Thanks all. @Jirapongse 's response helped in my case.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 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
- 248 ETA
- 552 WebSocket API
- 37 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.8K Refinitiv Data Platform
- 622 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 84 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛