# Limit API token to read only?

**URL:** <https://discourse.getcockpit.com/t/limit-api-token-to-read-only/772>\
**Category:** Support\
**Created:** [April 25, 2019, 12:02am UTC](https://discourse.getcockpit.com/t/limit-api-token-to-read-only/772 "2019-04-25T00:02:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonday](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jasonday](https://discourse.getcockpit.com/u/jasonday)\
**Post date:** [April 25, 2019, 12:02am UTC](https://discourse.getcockpit.com/t/limit-api-token-to-read-only/772/1 "2019-04-25T00:02:11Z")

</div>

When creating a new key, how do I utilize the rules to limit that api token to read only access?

---

<div class="post-metadata">

**Author:** ![putude](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/putude/32/254_2.png) [@putude](https://discourse.getcockpit.com/u/putude)\
**Post date:** [April 25, 2019, 12:49am UTC](https://discourse.getcockpit.com/t/limit-api-token-to-read-only/772/2 "2019-04-25T00:49:31Z")

</div>

I use Cockpit Group Addons  
[https://github.com/serjoscha87/cockpit\_GROUPS](https://github.com/serjoscha87/cockpit_GROUPS) to add new group and give it access desired (read only or full access) to the collections.

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [April 25, 2019, 6:23pm UTC](https://discourse.getcockpit.com/t/limit-api-token-to-read-only/772/3 "2019-04-25T18:23:04Z")

</div>

You can use group rules with the group addon or via config file or simply create a new api token and set it to `/api/collections/get/collection_name`. Now this specific token has only access to read `collection_name`.

[https://getcockpit.com/documentation/api/token](https://getcockpit.com/documentation/api/token)
