Hi There,
I'm trying to get data from a REST service with access token which only lasts for an hour and I have to refresh it to get the refresh token to continue to get records from the API maintaining the last pull result. I'm trying to build the logic but I don't seem to figure it out.
Is there a way to do this in KNIME ?
Appreciate any help.
Thanks !
Refreshing a token is usually just another REST request. So I'd either …
- add an if-else branch after your initial REST request to catch a "token expired" state, refresh the token if necessary, re-run the request (this would probably be surrounded by a loop)
- check the token validity in advance and renew if necessary
Suggested building blocks: if-else, try-catch, loop nodes.