Hi All,
As pre previous post a while back I am integrating a really flexible piece of survey software called NestForms https://www.nestforms.com into my tadabase APP.
Essentially, I am sending some quotation data from by TB app to NestForms backend database so that the assigned sales rep can conduct the related survey in the app.
(The sales rep will select a quote from the quotes table that they want to do a survey for, press the button (trigger pipe) that sends data to NestForms.
They need to do this as not all jobs are surveyed, and it also “tags” the entry in the Nest Forms database for them.
Unfortunately, Nest API uses OAUTH2 for authentication (with expiring tokens), so I have had to attempt to build this using Pipes etc.
I have actually made some good progress on this.
- Using private credentials in a custom component, I request an Authorization Code which I get back via a custom component. This is a one-off activity really so no worries there.
- I have a (for now a manually triggered) pipe that uses this Auth Code to request an Access Token and Refresh Token and insert into a one row “Auth” table.
- I manually use the access token to request/Update the data in Nest via pipe.
- However, the Access token dies after 60 min. The Refresh token dies after 1 month.
- Therefore, I have to request a new Access token using the Refresh token via a Pipe.
- This then provides a new Access Token and a new Refresh token which I store in my one row “Auth” table (over writing old codes).
- This starts the clock on both Access token (60 min) and Refresh token (1 Month) again.
- I have multiple users on the system. Only one Access token works at a time so must be shared between all users.
I need
- a way to keep the Access Token refreshed (or refresh it, if it is expired)
- a way to pass this token into my manually triggered pipe
I thought I might be able to trigger a pipe every 50 mins from the scheduler, but that frequency is not possible in Tadabase. No clue yet how I might pass the Access Token to the pipe
Any ideas appreciated …brain fried at this stage