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?
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.
Hi @Midori.Miyata0,
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.
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.
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?
Making the post public. Please don't post private questions unless confidential client information is included.
Thank you so much for your help.