Lipper API - Token Errors
Best Answer
-
You may need to log the error message from the body of the response message.
For more information, please refer to the Limitations and Guidelines for the RDP Authentication Service article.
0
Answers
-
hi @maximilian.mayrl ,
Could you please provide the code you use. (please also remove the credentials out of the code)
0 -
@maximilian.mayrl , Is this a trail license? If so, maybe you can check if it's trail period is expired. If it is a normal paid license, did that user recently added or modified his/her service subscription? I am using the RDP Funds API and I have no issue encountered today.
0 -
SCOPE = "trapi
TOKEN_ENDPOINT = "https://api.refinitiv.com/auth/oauth2/v1/token"
expires_at = time.time()
auth_data = {"username": pen.settings.LIPPER_USERNAME, "password": pen.settings.LIPPER_PASSWORD, "grant_type": "password","scope": SCOPE, "takeExclusiveSignOnControl": "true"
}
refresh_data = {"refresh_token": lipper_refresh_token, "username": pen.settings.LIPPER_USERNAME, "grant_type": "refresh_token"
}
def get_token():
global lipper_token, expires_at, lipper_refresh_token, rest_token_error_messages
# global datascope_token
if lipper_token == '' or expires_at < time.time():
if lipper_refresh_token == '':
respond = requests.post(TOKEN_ENDPOINT, headers = {"Accept": "application/json"}, data = auth_data, auth = (CLIENT_ID, CLIENT_SECRET))
else:
respond = requests.post(TOKEN_ENDPOINT, headers = {"Accept": "application/json"}, data = refresh_data, auth = (CLIENT_ID, CLIENT_SECRET))
if respond.status_code != 200:
return None
else:
respond_dict = respond.json()
lipper_token = respond_dict['access_token']
lipper_refresh_token = respond_dict['refresh_token']
refresh_data['refresh_token'] = lipper_refresh_token
expires_at = time.time() + int(respond_dict['expires_in']) - 10
SCOPE = respond_dict['scope']
auth_data['scope'] = SCOPE
return lipper_token0 -
Hi @raksina.samasiri
There is the code we use for getting a token. It works without problems locally and only from time to time on the server.0 -
@b.lee
We have a normal paid license and the subscription user was not changed recently. The problem is that everything works just fine locally and not stable on the server. Sometimes we get Token Error 400 and 401 there.0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛