Skip to Content

How to Use the OData API with Basic Authentication

Introduction

App users can access a published app's data via the OData API using basic authentication and personal access tokens (PATs).

An app administrator must enable personal access tokens for users before they can generate PATs for themselves. When they are no longer needed, users should delete their PAT.

Enable Personal Access Token

App administrators must follow these steps to enable PATs before users can generate them:

  1. Log in to the app as an app administrator.
  2. Open the Employees module and select the user that needs to generate a PAT.
  3. Enable the Enable Personal Access Token setting.
  4. Click Save.

The user must log out and in again, then open the user menu to see the Personal Access Token section:

Personal Access Token section

Tip

Enable Personal Access Token can also be enabled when adding users.

Generate Personal Access Token

To generate a personal access token, follow these steps:

  1. Log in to the app as the app user.
  2. Open the user menu and expand the Personal Access Token section:

    Generate New Token

  3. Click Generate New Token.

  4. In the field This Token is For, enter a short (up to 50 characters) description of the token's purpose:

    PAT Description

  5. Click Generate New Token. The panel will change to show the OData URL, and the basic auth username and token:

    PAT Generated

  6. Click Copy to copy the OData URL, username, or token.

    Important

    When you click Got It, the token is permanently hidden and can not be retrieved. Be sure to copy it before closing the dialog.

  7. Click Got It.

Note

You can have only one personal access token at a time.

Delete a Personal Access Token

To remove a personal access token, follow these steps:

  1. Log in to the app as the app user.
  2. Open the user menu and expand the Personal Access Token section.
  3. Click Delete.
  4. The token is deleted without confirmation.