https://linen.dev logo
#singer-tap-development
Title
# singer-tap-development
a

alex_dimov

11/21/2022, 8:28 PM
Earlier I learned about one product, now I want to ask about another product, maybe someone knows how to do it. So the second product connectwise automate Authorization requests they have the following. 1. We make a post request to /cwa/api/v1/apitoken with req.body username and password and req.header - clientId - the received token lives for 1 hour 2. With the help of the token that we received in paragraph 1, we make all requests for all links 3. The main problem is refresh In order to update the token, we must send a POST request to /cwa/api/v1/apitoken/refresh with the received token from item 1 in req.body (the peculiarity is that this token must be valid, that is, you need to have time to do urfresh before how does it expire) As an option to bypass 3 points, I thought about the option not to update the token, but to get the token again every time it starts (from /cwa/api/v1/apitoken) But how to do it right? Where can I write the received token from /cwa/api/v1/apitoken to use it for all the streams I use?