Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Refinitiv Data Platform /
avatar image
REFINITIV
Question by Midori.Miyata · Jul 30, 2020 at 05:27 AM · research api

Research API - refresh credentials 5 min before expiration

Research API user guide 2.0, page 17 says:

"Note: Cloud credentials are active for one hour; please refresh the credentials five minutes before the expiration."

Is there any sample code available for the process?

People who like this

0 Show 1
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Gurpreet ♦♦ · Jul 31, 2020 at 01:38 PM 0
Share

Making the post public. Please don't post private questions unless confidential client information is included.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Gurpreet · Aug 04, 2020 at 01:27 PM
If “Atexit.register(removeSubscription)” is deleted from “startResearchAlerts() sample, currentSubscriptionID returned by “subscribeToResearch” is always the same? In other words, is it not necessary to change the below part to get current subscription ID? If yes, please advise how to change.

Your application will have to store the subscription parameters from existing subscription and skip the SubscribeToResearch() function. Calling this function again, will create a new subscription for the application - which is not what you want. At some point new subscriptions will be denied as well.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Midori.Miyata · Aug 05, 2020 at 12:43 PM 0
Share

Thank you so much for your help.

avatar image
REFINITIV
Answer by veerapath.rungruengrayubkul · Jul 30, 2020 at 09:40 AM

Hi @Midori.Miyata,

To refresh cloud credential, application just sends a new cloud credential request. The request is exactly the same as the initial cloud credential request. For 5 minutes before expired, you can use a timer with 55 minutes expired to call the cloud credential request.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Midori.Miyata · Jul 30, 2020 at 01:54 PM 0
Share

Is it essentially no difference between sending a new credential request before 5 min expiration and sending it after expiration as far as using the same subscription?

avatar image
REFINITIV
Answer by Gurpreet · Jul 30, 2020 at 02:00 PM
Is it essentially no difference between sending a new credential request before 5 min expiration and sending it after expiration as far as using the same subscription?

See the python Research Messages sample provided in the downloads tab. It does not proactively try to refresh the Cloud credentials, but does so upon expiry-exception.

Comment

People who like this

0 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Midori.Miyata · Jul 31, 2020 at 02:22 AM 0
Share

My client is trying to modify “startResearchAlerts()” in “researchAlert.py”. (now messageAlert.py) . He wants to retrieve all the data for the day by starting at fixed time (eg. 17pm) every day. Retrieving data takes more than 1 hour in most cases.

Please advise how to modify the code? Just deleting (atexit.register(removeSubscription) is OK?


avatar image
REFINITIV
Gurpreet ♦♦ Midori.Miyata · Jul 31, 2020 at 01:35 PM 0
Share

You cannot receive messages prior to starting your subscription. For this,

1. Start subscription and don't close it upon exit.

2. Poll all accumulated messages from cloud at your required time

This requires lot more changes than just deleting atexit function.

avatar image
REFINITIV
Midori.Miyata Gurpreet ♦♦ · Aug 04, 2020 at 10:52 AM 0
Share

If “Atexit.register(removeSubscription)” is deleted from “startResearchAlerts() sample, currentSubscriptionID returned by “subscribeToResearch” is always the same? In other words, is it not necessary to change the below part to get current subscription ID? If yes, please advise how to change.

print("Subscribing to research stream ...");

endpoint, cryptographyKey, currentSubscriptionID = SubscribeToResearch()


Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

EDP Research API - Need assistance on rules applied when this API removes newline characters.

Is docID to retrieve research reports via EDP API a unique and non-overlapped ID?

I can not get credential in Research API

What does "Number of user subscription exceed the limit" mean and how can it be resolved?

Can't install sqsQueue library for Python to retrieve Research Alerts via Research API using the sample python scripts.

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges