# How to programmatically set KEYCLOAK\_ADAPTER\_STATE cookie

**URL:** <https://forum.keycloak.org/t/how-to-programmatically-set-keycloak-adapter-state-cookie/388>\
**Category:** Securing applications\
**Created:** [November 12, 2019, 3:09pm UTC](https://forum.keycloak.org/t/how-to-programmatically-set-keycloak-adapter-state-cookie/388 "2019-11-12T15:09:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlogiacco](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/rlogiacco/32/93_2.png) [@rlogiacco](https://forum.keycloak.org/u/rlogiacco)\
**Post date:** [November 12, 2019, 3:09pm UTC](https://forum.keycloak.org/t/how-to-programmatically-set-keycloak-adapter-state-cookie/388/1 "2019-11-12T15:09:50Z")

</div>

I’ve successfully logged into Keycload programmatically via the AuthzClient and obtained an RPT, I now wish to set this login into the client by pushing the KEYCLOAK\_ADAPTER\_STATE cookie: how can I convert the RPT to the cookie value?
