Get a Valid CSRF Token for the Multi Action API
You must have a valid x-csrf-token before creating a POST request (used in the API to initiate a multi action).
You can get a token by sending a GET request to <tenant-url>/api/v1/csrf, including the x-csrf-token: fetch header. The csrf token is then returned in the x-csrf-token response header.
Once you get the token, you can use it to send POST requests in the same session. The x-csrf-token:<token> header must be included in the request.
API Usage
|
URL |
<tenant-url>/api/v1/csrf |
|
Request Type |
GET |
|
Header Name |
x-csrf-token:<token> |
|
Header Value |
fetch |
Response
The CSRF token is returned in the x-csrf-token response header. This token can then be included in the POST request in the x-csrf-token:<token> header.