Generate an API key from Airtable Account
First, you need to have an Airtable account and create an API key.
Open your Airtable account.
Click your account icon from the upper right side of the page
Then select the Account option from the list
On the Account page, you will see the Generate API key button
When you click the button, Airtable automatically creates an API key for your personnel usage from your account
Copy this generated key to your clipboard.
How to reach your Airtable Database's End-point
Go to https://airtable.com/api address and list your existing databases.
Then select which database you want to use (Let's assume that we are trying to connect Movie Database to Code2)
Select the 'List Records' selection from the MOVIES TABLE
Airtable automatically generates a curl example on the right side of the page
Copy the URL which was shared in the example section
Connect your Airtable data to a simple Code2 table
Once you have completed the steps defined above, it is now time to switch to the Code2 editor screen
Add a 'Table' component to the page from the component list
Then select the table name from the navigation tree and choose the Datasource tab from the right menu.
Click the 'Open REST Configuration' button.
Set the following parameters which you copied from your Airtable account:
URL: GET --> https://api.airtable.com/v0/app4s......
Content Type: application/json
Data Root: records
Then click to 'Add Parameters' button to set your Airtable API Key
Name: Authorization
Source: Static Value
Value: Bearer YOUR_API_KEY
Send In: header
Click to 'Send' button to test your Airtable configuration
If there is no error in the configuration, Editor mode will automatically switch to Output mode, and you will see your data
After that, you only need to map your Airtable data with Code2 table columns.
To see the result, click the 'Finish' button. Your table will start to show your data stored in your Airtable database.