Skip to main content
Best answer

App Authorization using JSESSIONID cookie


Hi,


I am trying to connect to a REST API that only uses a cookie for authentication (JSESSIONID) has anyone had any success doing similar, either by creating an app or by using webhooks?


Cheers

Mark.


Best answer by ikbelkirasanBest answer by ikbelkirasan

Hi @squizzer

Yes, in a CLI app, you can use "session" authentication, then set up the username and password fields. When the authentication is performed, it should parse the cookie from the response headers and extract the JSESSIONID then return it so that Zapier stores it and makes it available in bundle.authData. Finally, when you send future requests to the API, make sure to include the JSESSIONID value in the request Cookie header.


View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • Answer
  • March 4, 2020

Hi @squizzer

Yes, in a CLI app, you can use "session" authentication, then set up the username and password fields. When the authentication is performed, it should parse the cookie from the response headers and extract the JSESSIONID then return it so that Zapier stores it and makes it available in bundle.authData. Finally, when you send future requests to the API, make sure to include the JSESSIONID value in the request Cookie header.



  • New
  • 1 reply
  • March 25, 2020

Hi @ikbelkirasan I’d love to see the code you used to parse out the cookies -- proving tricky for me!