> For the complete documentation index, see [llms.txt](https://docs.goaffpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goaffpro.com/program-settings/extra-settings/setup-affiliate-public-store/generate-storefront-access-token.md).

# Generate Storefront Access Token

#### Generate the storefront access token for setting up the affiliate public store:

To generate the storefront access token, install the [Headless channel](https://apps.shopify.com/headless) from the Shopify app store.&#x20;

<figure><img src="/files/nyYdA80QRtyTIxNYa9NA" alt=""><figcaption><p>Install the Headless channel from the Shopify app store</p></figcaption></figure>

This will open up the Storefronts section.

<figure><img src="/files/oTna4yiiTNqdBVRYTpt1" alt=""><figcaption><p>Storefronts</p></figcaption></figure>

Here, click on **Create storefront**.&#x20;

<figure><img src="/files/XMjAbhTbaxJTpZZBhOyf" alt=""><figcaption><p>Click on Create Storefront</p></figcaption></figure>

To access the Storefront API, click on **Manage**.

<figure><img src="/files/a8tvFHMbCPW2LYuTfAa9" alt=""><figcaption><p>Storefront API > Click on Manage</p></figcaption></figure>

This will open up the Storefront API section.

<figure><img src="/files/hMKMtGafOo4o3oXzCNiT" alt=""><figcaption><p>Storefront API</p></figcaption></figure>

Next, click on **Edit** to update the Storefront API permissions.

<figure><img src="/files/BIDRYv4ICdqkxcvui0Eu" alt=""><figcaption><p>Storefront API permissions > Click on Edit</p></figcaption></figure>

After this, enable the "unauthenticated\_read\_product\_inventory" permission.&#x20;

{% hint style="info" %}
The following Storefront API permissions need to be enabled:&#x20;

* unauthenticated\_read\_product\_listings
* unauthenticated\_read\_product\_inventory
* unauthenticated\_read\_product\_tags
* unauthenticated\_read\_customers
* unauthenticated\_write\_customers
* unauthenticated\_read\_content
* unauthenticated\_read\_checkouts
* unauthenticated\_write\_checkouts

Please note that most of these permissions are enabled by default.
{% endhint %}

<figure><img src="/files/4a1haV4IHsMqP3qqBDEc" alt=""><figcaption><p>Enable the "unauthenticated_read_product_inventory" permission</p></figcaption></figure>

Finally, click on **Save**.

<figure><img src="/files/wD3mXmG2y8bGEQ8KotNp" alt=""><figcaption><p>Click on Save</p></figcaption></figure>

You can copy the generated storefront API access token and use it to set up the affiliate public store.&#x20;

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

{% embed url="<https://youtu.be/7vOPVxdIjd0>" %}
Generate Storefront Access Token
{% endembed %}
