> For the complete documentation index, see [llms.txt](https://maqsoftware.gitbook.io/embedfast-technical-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://maqsoftware.gitbook.io/embedfast-technical-documentation/setting-up/post-deployment/generate-a-token-using-postman/app-only-token.md).

# App-only token

Use this approach if you want an access token to have app-only context. In this case, EmbedFAST will use an app-only token for authentication and retrieve user identification from the ‘embedfast-user-id’ header parameter to use for authorization (access control and validation).

{% hint style="info" %}
**Note:**

* The EmbedFAST Admin API **does not** support this approach.
* The EmbedFAST User (Client) API can use this approach if you need to integrate with any available authentication providers.
  {% endhint %}

1. Log into [Postman](https://www.postman.com/).
2. Go to the **Workspaces** tab > **My Workspace**.<br>

   <figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-f441caa05f92aa6323ba7e868c2d26b880d0edf3%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Click on the **+** icon next to the **Overview** tab to create a new request.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-f0de8b08c0e37c64c064fe845989caf73414418d%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

4. This will take you to a new request page.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-233aabbbea8638486e2eefc849e974eb5bb22b37%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Click on the **Authorization** tab below the entry field.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-7ea0f8c2703173168fccb3a309e8db36ee1f0c24%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

6. From the drop-down menu next to **Type**, select **OAuth 2.0**.

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-50d0e0c9978a4d2e4dab22379b570ccdb4740791%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

7. Add parameters under the **Configure New Token** section as detailed in the table below:

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-5ecf143fa2f92022e1af79f9c9746f3ae3463f74%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

| **Parameters**        | **Inputs**                                                                    |
| --------------------- | ----------------------------------------------------------------------------- |
| Token Name            | Create and enter a token name                                                 |
| Grant Type            | Select **Client Credentials**                                                 |
| Access Token URL      | **<https://login.microsoftonline.com/\\><Your-Tenant-ID>/oauth2/v2.0/ token** |
| Client ID             | Enter the client ID of the EmbedFAST API's app registration                   |
| Client Secret         | Enter the client secret of the EmbedFAST API's app registration               |
| Scope                 | **api://\<Client-ID>/.default**                                               |
| Client Authentication | **Send as basic Auth header**                                                 |

{% hint style="info" %}
**Reminder:** Ensure that the callback URL is added as a redirect URI in the app registration for the EmbedFAST API, as detailed in [previous sections](/embedfast-technical-documentation/setting-up/post-deployment/add-the-redirect-uris.md).
{% endhint %}

8. Click on **Get New Access Token** after entering the parameters detailed above.<br>

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-5aec146547162514c648b2a992cb50141f01b5d1%2Fimage%20(165).png?alt=media" alt=""><figcaption></figcaption></figure>

9. A dialog box will appear which confirms the completion of the authentication.\ <br>

<figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-4732c032b604d8250ed1ffe0b2389ff5fd018404%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

10. You can copy the access token from the page shown below.<br>

    <figure><img src="https://2643060172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwWVFb1sEdUq6IwVu5D2%2Fuploads%2Fgit-blob-93423c17a51058f63e531aff8f451af0750d2574%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
