Create a Table in the Data Store

Next, let’s create a table in the Data Store. This table is used to store the Refresh Token and userID values, which are retrieved whenever an Access Token needs to be generated.

To create a table:

  1. Navigate to Catalyst Cloud Scale service in the console and click Data Store under Storage.

  2. Click Create a new Table.

new-table

  1. Enter the table’s name as “Token” and click Create.

token-table2

Note: Ensure that you enter the name exactly as instructed, because the application's code contains the same name.

The table will be created and displayed in the Data Store page.

Now, let’s create two columns in the table to store the userID and the refresh token respectively.

  1. Click New Column in the Schema View section of the Data Store table.

add-new-column

  1. Enter the column’s name as “refresh_token”. Select the data type as Encrypted Text.

column-example

You can learn about the various data types supported by Catalyst and the other properties of a column from the Data Store help page.

Note: Ensure that you enter the name exactly as instructed, because the application's code contains the same name.
  1. Click Create.

Create another column using the previous steps with the column name as “userId” of the data type “BigInt”. You need not provide any other values.

userid-column

The columns will be created and listed in the Schema View section.

Configure Scopes and Permissions

To allow any user of the Lead Manager application to view or manage leads from the client application, you must enable an additional table permission that will allow the user to fetch and store new Refresh Tokens, if needed.

Click the Scopes and Permissions tab for the Token table, then check the Insert permission for the App User role under Table Permissions section. The Select permission will already be checked by default.

permissions

The Data Store is now configured for the application.

Last Updated 2024-03-11 19:30:08 +0530 +0530

RELATED LINKS

Data Store