# Token Hierarchy / Permissions

You can use parent/child token hierarchies to associate a single respondent's answers with multiple tokens. This allows you to distribute various sets of tokens to different user groups. Based on the token, you can control form permissions, enabling some tokens to have read or write access while others do not.

To setup a token hierarchy all you have to do is to define the parent token to which the token belongs.

<figure><img src="/files/hijIpFdKDAKB3P3bWEQo" alt=""><figcaption></figcaption></figure>

Once you have setup the parent token it will be grouped on the token grid

<figure><img src="/files/tntrSdbmcAnJZhnb5Jzj" alt=""><figcaption></figcaption></figure>

In the example above LCOMY0QSJZLO and FG7K7Y4JYMAE will share the same respondent data when they are used.&#x20;

## &#x20;🔑 Token Permissions

Token permissions will let you configure what each token owner can do with your form data. For example you can grant read only access to your form to a given token while the other token has full read / write access. You can define these permissions at the answer or question level in your form.

{% hint style="warning" %}
Make sure to enable the token as [Key provider](/form-management/security/key-provider-concepts.md) as its required to be able to set token permissions.
{% endhint %}

To define permissions assign one or multiple [users](/multi-user-management/users.md) or [groups](/multi-user-management/groups.md) to your token using the Security Access icon.

![](/files/9MhUnHNSOP6ulqKefx2T)&#x20;

![](/files/WRVR5ULfP9Xt7MXdGfd7) &#x20;

This is the user or group for which you will be able to set permissions on your forms. Once you have define which user or group is assigned to your token you can go to the form designer and in either question or answer of your choice click on the permission icon to set the permissions&#x20;

![](/files/eOpSJG5XtXbNKEEKs7CR) &#x20;

<figure><img src="/files/bG4FEiLw4XEaMSj4n83s" alt=""><figcaption></figcaption></figure>

In the example above the question data would be read only for all tokens being assigned to the "Patients" group.

{% hint style="warning" %}
If none of the permission read or write is set but the user or group is added to the security access the question or answer will be hidden for that user or group
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ngsurvey.com/form-management/security/security-items/tokens/token-hierarchy-permissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
