# Dynamic menu based on API response

**URL:** <https://community.hubspot.com/t/dynamic-menu-based-on-api-response/82420>\
**Category:** CMS Development\
**Tags:** local-development, javascript, professional\
**Created:** [June 1, 2023, 5:43am UTC](https://community.hubspot.com/t/dynamic-menu-based-on-api-response/82420 "2023-06-01T05:43:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sk05](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@Sk05](https://community.hubspot.com/u/Sk05)\
**Post date:** [June 1, 2023, 5:43am UTC](https://community.hubspot.com/t/dynamic-menu-based-on-api-response/82420/1 "2023-06-01T05:43:11Z")

</div>

Hi Everyone,

We have the Login feature and SITEs are built in HubSpot, All the user’s information and other information is stored in our client’s existing server DB.  
Our Problem is that After login we have to show the menus based on the API response of the user’s permission  
For Example,  
Users have Post access they can see POST Page in the menu.  
Users have News access they can see NEWS Page in the menu.  
Users have Article access they can see the ARTICLE Page in the menu. like that  
Whoever does not have permission to view POST, NEWS, ARTICLE we should not show this in the menu list.  
So, please share your ideas. Thanks

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [June 1, 2023, 7:13am UTC](https://community.hubspot.com/t/dynamic-menu-based-on-api-response/82420/2 "2023-06-01T07:13:22Z")

</div>

Hi @Sk05,  
I would personally store this information in a cookie or something similar. DO NOT store any personal information, only the permissions that a user has, and that way, you can use HubL to access that information with `[request.cookies](https://developers.hubspot.com/docs/cms/hubl/variables#http-request-variables)`.  
If the permission functionality is more than just showing different menu items, and you will allow users to manipulate data from the HS website, you definitely need a different approach because of security.

---

<div class="post-metadata">

**Author:** ![Sk05](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@Sk05](https://community.hubspot.com/u/Sk05)\
**Post date:** [June 1, 2023, 10:26am UTC](https://community.hubspot.com/t/dynamic-menu-based-on-api-response/82420/3 "2023-06-01T10:26:20Z")

</div>

Hi @Teun Thanks for the reply. Yes that’s work
