I want to authenticate to a certain SaaS using Zapier → get information.
The JSESSIONID is issued in the authentication phase, and the JSESSIONID is required in the information acquisition phase of the next step.
However, I don't know how to take over the JSESSIONID included in the response of the authentication phase to the next step. Please tell me how to use the JSESSIONID of the response in the next step.
Best answer
How to keep response JSESSIONID
Best answer by GetUWiredBest answer by GetUWired
Ahhh… so the issue is that the JSESSIONID is included in the response header and not in the response body? The zapier webhook feature will only return what is included in the response body.
You will need to make the request in a code block. You can use a javascript code block & fetch to do this.
You will have to use the input fields to pass the username, password, api key, and timestamp values then you can access them using inputData[‘whatever you defined the input variable as’]
let response = await fetch(URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'username': USERNAME VALUE,
'password': PASSWORD VALUE,
'apiKey': API KEY VALUE,
'timestamp': TIMESTAMP VALUE
})
});
let headers = await response.headers;
return headers
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.