> ## Documentation Index
> Fetch the complete documentation index at: https://docs.precallai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WhasApp Access Token

> This page describes everything about whatsApp Access Token Generate

## Steps to Get a Permanent Access Token

1. Access [Business Settings:](https://turivishal.medium.com/permanent-access-token-for-whatsapp-business-apis-c81e1dfc86c7)<br />

   * Go to Business Settings.

2. Navigate to System Users:<br />
   * Under Users, click on System Users.

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/1.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=d0c82e180e49fd193dc1c2672b0b4f22" style={{ borderRadius: "0.5rem" }} width="462" height="385" data-path="images/whatsapp-business-id/1.webp" />
</Frame>

3. Create a System User:<br />
   * Click the Add button.
   * Provide a name for the system user.
   * Select a role.
   * Click Create System User.

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/2.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=4c498cd7127b7636b867dc4f0399af82" style={{ borderRadius: "0.5rem" }} width="720" height="470" data-path="images/whatsapp-business-id/2.webp" />
</Frame>

4. Accept Non-Discrimination Policy:<br />

   * Review and accept the non-discrimination policy on behalf of your system users.

5. Finalize Creation:<br />

* After accepting the policy, click Done.

6. App Association (if needed):<br />

   * If you receive an error stating that an app must be part of the business, you need to create a Facebook app associated with your Business Manager first. Once the app is created, return to this step.

7. Add App:<br />

* Under Accounts, click on Apps.
* Click the Add drop-down menu.
* Select Connect an App ID.
* Enter the Facebook app ID.
* Click Add App.

8. Assign assets such as your Pages, ad accounts, Facebook apps, and catalogues.<br />

* Click on the Add Assets button, it will open a model and you can able to see, 1. Select asset type, 2. Select assets, and 3. App.
  <Frame>
    <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/5.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=3e8f60b2c9b930abddcdbbfc7dcdc9d8" style={{ borderRadius: "0.5rem" }} width="720" height="423" data-path="images/whatsapp-business-id/5.webp" />
  </Frame>
* Click on Apps under Select asset type, available in the left corner.
* Click on the Specific App’s checkbox(s) that you want to provide access to the current user under Select Assets, available in the middle section.
* Click on the Manage app toggle option and enable it for all access, you can customize it by other options available in this App section.
* Finally, Click on the Save Changes button.

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/6.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=add0bafd2c283e4fd57fd85f2f66f4ec" style={{ borderRadius: "0.5rem" }} width="720" height="420" data-path="images/whatsapp-business-id/6.webp" />
</Frame>

### "Congratulations, you have added assets successfully."

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/7.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=61c1e5779e7db242d12c9d2e6c9f7e9d" style={{ borderRadius: "0.5rem" }} width="395" height="191" data-path="images/whatsapp-business-id/7.webp" />
</Frame>

Now you can able to see the added assets in the Assigned assets

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/8.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=7d651c51051042299c449a6335504285" style={{ borderRadius: "0.5rem" }} width="720" height="405" data-path="images/whatsapp-business-id/8.webp" />
</Frame>

<b>'Generate Access Token'</b>

1. Click on the Generate New Token button.

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/9.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=e3ebc27d6a6a8e8bf428a1dc76fa89ad" style={{ borderRadius: "0.5rem" }} width="720" height="411" data-path="images/whatsapp-business-id/9.webp" />
</Frame>

2. Select an App, That you want to generate a token for.

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/10.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=215e5a6b0a53b466e38ccf8640bd5ce8" style={{ borderRadius: "0.5rem" }} width="446" height="261" data-path="images/whatsapp-business-id/10.webp" />
</Frame>

3. You can able to see the list of Info, Warnings, and a section <b>Available permissions.</b>

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/11.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=54e33d075d64a68006a465e7ce2cf85d" style={{ borderRadius: "0.5rem" }} width="443" height="609" data-path="images/whatsapp-business-id/11.webp" />
</Frame>

4. Scroll down to the Available permissions, there is a list of API components, you need to select “whatsapp\_business\_messaging” and “whatsapp\_business\_management” for WhatsApp Business APIs access and Click on the Generate Token button.

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/12.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=20335fbdb152cbc7f12978b80f9980c5" style={{ borderRadius: "0.5rem" }} width="448" height="312" data-path="images/whatsapp-business-id/12.webp" />
</Frame>

5. It will appear as a model and you can able to see the newly generated Access Token, Just Copy the Access Token and store it in a safe place i.e. your project’s environment(env) file.

<Frame>
  <img src="https://mintcdn.com/precallai/nBBG9or-9a8XFheY/images/whatsapp-business-id/13.webp?fit=max&auto=format&n=nBBG9or-9a8XFheY&q=85&s=a9ff50e160e5cda21a87237c2c04b96f" style={{ borderRadius: "0.5rem" }} width="448" height="413" data-path="images/whatsapp-business-id/13.webp" />
</Frame>

<Note>
  Copy and save this token as it won’t be stored on Facebook, Remember, you can
  only share a token once. Each new system user requires a newly generated
  token.
</Note>
