unsupported_grant_type

Hi
I am trying to test connectivity for my WebSocket API application (what I need https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.TRNA/blob/master/notebook/mrn_realtime_news_notebook_app.ipynb).
The command I am trying:
curl --data-urlencode "grant_type=password&takeExclusiveSignOnControl=True&scope=trapi&username=GE-myusername&password=mypassword" -X POST -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -v https://api.refinitiv.com:443/auth/oauth2/v1/token
The response I have is {"error":"unsupported_grant_type" }.
I appreciate if you can help me to resolve this issue.
Thanks
Vera
Best Answer
-
Hello @Vera Ekimenko
Could you please try with the following curl command?
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=<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>'I noticed that your curl command does not contain the client_id parameter as well.
The Refinitiv Real-Time Optimized (formerly known as ERT in Cloud) uses RDP APIs authentication. I suggest you check the following resources about RDP authentications:
Alternatively, you may use the Postman collection to verify your RDP/Machine ID credentials.
0
Answers
-
Hi Wasin
Thank you for a prompt response. I have generated client_id using this
" target="_blank">https://emea1.apps.cp.thomsonreuters.com/apps/AppkeyGeneratorThe Product is 'DEVPORTALUNQUALIFIEDCONTACTS.VERAEKIMENKO' which is not what my organisation is using (TRNA).
When I am trying to post a request from your Postman collection 'Authentication/Get Access Token' with the values set in RDP Env Starter environment (usename, password, client_id generated above) I have an error:
{
"error": "access_denied",
"error_description": "Invalid username or password."
}
How to get the correct client_id?Thank you
Vera
0 -
Hi Wasin
Update: I have tried your curl command and it works with my client_id
. I'll try it with my app and post if I have any issues. Thank you for your help.
Thank you
Vera Ekimenko
0 -
Hello @Vera Ekimenko
The Curl and Postman results should be identical with the same credentials. I suggest you check the Postman setting guide in the RDP Postman tutorial.
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
- 684 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
- 249 ETA
- 554 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.9K Refinitiv Data Platform
- 643 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
- 192 TREP Infrastructure
- 228 TRKD
- 915 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 中文论坛