# Generate Access Token from Facebook

Check out the detailed video on [**How to Generate Instagram Access Token?**](https://youtu.be/JAUYe1A2dp0?si=18pdGiJEJDMEWA7d)

**Step 1:** Get a **Facebook & Instagram Business Account**.

**Step 2:** **Verify** Your Business Account.

**Step 3:** Create a **Facebook Page** and connect it with the Instagram account for which you want to generate a token.

**Step 4:** Create a **Facebook App**. For that, visit

<https://developers.facebook.com/apps>&#x20;

**Step 5:** Now, create an app. For that, click on the **Create App** button.

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

Step 6: Enter the **App name**, **App contact email**, and click on **Next**.

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

**Step 7:** Select **Use case** and click on **Next**.

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

**Step 8:** Select **App type** and click on **Next**.

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

**Step 9:** Finally, review app details and click on **Create app**.

<figure><img src="/files/3jMNBIUb8rSPRU7AGsOU" alt=""><figcaption></figcaption></figure>

**Step 10:** Now, go to **App settings > Basic** and fill basic App details.

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

**Step 11:** Fill in Website details and **Save changes**.

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

**Step 12:** Go to your **Facebook Business Account**. Navigate to **Users > System users** and **Add** a user.

<figure><img src="/files/87MlpKfnYJV3ku3gXSAA" alt=""><figcaption></figcaption></figure>

**Step 13:** Enter the **System user name** and assign the **Admin role**. Then click on the **Create system user** button. The system user is created successfully.

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

**Step 14:** Navigate to **Accounts > Apps** and **Add** an app.

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

**Step 15:** Choose the **Connect an app ID** option.

<figure><img src="/files/2YlbFU9g9o8vpCV97Xn3" alt=""><figcaption></figcaption></figure>

**Step 16:** Enter the **App ID** and click on the **Add app** button. The app has been added successfully.

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

**Step 17:** Navigate to **Accounts > Pages** and **Add** a page.

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

**Step 18:** Select the **Facebook page** and click on **Next**.

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

**Step 19:** Give **Full control** to the Facebook page and click on **Confirm**. The page is added successfully.

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

**Step 20:** Click on the **3 dots** at the right corner and select **Assign assets**.

<figure><img src="/files/1WKqX2IuiQL9roAN9I0e" alt=""><figcaption></figcaption></figure>

**Step 21:** Add page to the asset.

<figure><img src="/files/1KiFnLCMYzxTjFGleQXs" alt=""><figcaption></figcaption></figure>

**Step 22:** Add account to the asset.

<figure><img src="/files/67D2pOvXKAR6KW5JOe7L" alt=""><figcaption></figcaption></figure>

**Step 23:** Add app to the assets and then click on the **Assign assets** button. The assets are successfully added to the user.

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

**Step 24:** Click on **Generate token**.

<figure><img src="/files/62rq78bmEaZFIBY02K1a" alt=""><figcaption></figcaption></figure>

**Step 25: Select app** to generate a token for and click on the **Next** button.

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

**Step 26:** **Set expiration** for the token and click on the **Next** button.

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

**Step 27:** **Assign permission** that you want to grant to the app and click on the **Generate token** button.

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

**Step 28:** Token is generated successfully. **Copy the Token** and add it to the Instagram extension configuration to authenticate the app.

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


---

# 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.magecomp.com/magento-2-instagram-feed-widget-pro/generate-access-token-from-facebook.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.
