I have an automation with several workspaces in series, the last one taking results from the previous and sending them as a series of API requests to a software.
![](https://uploads-us-west-2.insided.com/safesoftware-en/attachment/5acf10ed-df48-44f8-a627-415013afe20f.png)
the software has an antiforgery token that has to first be requested, then updated, so the final POST ends up being the 4th HTTP Caller.
![](https://uploads-us-west-2.insided.com/safesoftware-en/attachment/a9d8594a-2c12-45e2-ba43-937a7ffdb667.png)
The problem i’m having is slowing down the rate at which concurrent API calls are happening, so if multiple requests hit at approximately the same time, one of them will fail due to not receiving a new antiforgery token.
![](https://uploads-us-west-2.insided.com/safesoftware-en/attachment/edc4afd9-fa51-4e20-8eb2-cc1cd477babf.png)
![](https://uploads-us-west-2.insided.com/safesoftware-en/attachment/fcad6a4e-a1e8-4768-835d-236cf39b40b1.png)
i have added a queue to the workspace runner, with it’s own engine, I also added a decelerator to the beginning of the workspace with a 20 second delay in the hopes that the “first” API workspace would complete before the second one started, but, so far it has not been effective.
when it fails, it fails with an empty response from the initial xref token response (antiforgery token)
48 2024-5-20 11:28:29 | HTTPCaller_-_GET_XSRF (HTTPFactory): (5]: HTTP transfer summary (ADDRESS REDACTED): status code: 200, download size: 0 bytes, DNS lookup time: 6 ms, total transfer time: 82 ms
49 2024-5-20 11:28:29 | AttributeManager_3: Unable to match regular expression '=u^;]*' to any substrings in '0'
From Testing with postman, it looks like the API endpoint is the hold-up. while i can send requests every ~second or so and get responses, the xref token doesn’t update that quickly so shows up as a refreshed token instead of a new one, so the parsing i do to pick out the new code doesn’t work, since i’m not looking for the refreshed token.
So what i ultimately need to do is have a ~10 second delay between workspace runs and no concurrency - just one workspace at a time.
I thought the stuff i was doing above would accomplish that, but, i am still getting errors, so i suspect that is not the case.
i am unsure how to proceed.