Concerning the page number, why don’t you keep track of that and then after one minute you request for more data with an increase in page number, since you will be supplying the page number as an argument any way.
Sure I can keep track of the page number but I might be a little harder than that. I can’t save it within the action endpoint and return a non-200 to get a retry. And when I do not return the shortLivedToken will be invalid after the 1 minute wait.
Hi @basdebruin!
Have you considered issuing a permanent token (using OAuth), storing it and using it for this long process? Would this be a possibility?
Looking forward to hearing from you 🙂
Cheers,
Matias
hi @Matias.Monday
I fully understand that this can be solved using permanent (stored) tokens. To be honest I hate storing tokens and I hope our customers hate it as much as I do. ShortLivedTokens is a great way to improve privacy and I love to use them. I would consider using OAuth tokens is they had a more granular scope (like board). In the current state a customer needs to give full access (all boards) to the developer and I would never do that if I was the customer.
In my opinion monday.com needs to rethink this and support pagination in combination with shortLivedTokens. A possible implementation might be that the app does respond like “return res.status(206).json({page: 1});” and that monday sends that JSON in the payload of the retry post (with a new token). In that way the app could retrieve the next page and this continues until the app responds with 200.
I believe the underlying issue is that monday has implemented just one reaction on non 200 responses and that is “retry the same thing”.
Another solution would be that the app can store an app specific JSON to the board where the app could keep track on the pagination page number.
Hello @basdebruin,
Matias here!
I hear what you say about the shortlived tokens and adding support for pagination in combination with them sounds very interesting :🤔
I will share this input with our team so that it can be reviewed 🙂