Setting Cookie value in retool

Is there any way, we can set cookie value in retool, so as to set access token in it.

document.cookie = ""; as a query (where query1 is API)

I have few set of API, that will generate access_token, that I want to store in cookie

Please help me out it's an urgent requirement

1 Like

Try this article: API Authentication

1 Like

@ScottR I have gone through this docs, But it's based on retool Authentication. What if I have my own set of Api to generate access token, that I want to store in cookie

Can you help me in syntax?

I cannot, I am sorry - I am not sure if you can do what you want to do in retool which is why this documentation exists...Maybe reach out to support to make sure that what you want to do can be done in Retool....


I just want to make sure I understand. Does this section of our docs not describe what you're looking for?

Hoping to get this solved for you soon!

1 Like

@jSims How to do as per said by image?

What should be the process?

I just want to make sure I'm following correctly.

Do you want to set a cookie in the user's browser programmatically to then be forwarded to their resource?

I'm not sure you can directly set a cookie like this with Javascript in Retool but any API that returns a "Set cookie" header (which can be a part of a resources auth workflow in Retool) can be forwarded as a part of subsequent calls to the API. Is this what you're looking to do or are you looking to directly edit/create cookies within a Retool app?

1 Like

@jSims how do you clear these cookies? I can't seem to see anything in the docs.

Say I set a cookie when I log in to my own API and it returns a set cookie header. That works great but I can't seem to find anything in the cookies or see a way to unset this cookie. Any help is appreciated.

1 Like

I'm on the same page!
Figuring out ways to manage user's browser cookies some what

Good enhancement

In the mean while, here it goes a related thread

Hey @sionaldson!

At the moment, it looks like the only way to clear Retool-related cookies might be to either use the /logout endpoint or overwrite its value. What's the specific use case you have for clearing the cookie?

A post was split to a new topic: How can I save JWT token to make it accessible in my apps