Help

Use new Airtable connection OAuth2 integration with gatsby-plugin-airtable.

Topic Labels: API
1442 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Pataco80
4 - Data Explorer
4 - Data Explorer

Good morning,

Following research to develop an existing project, I decided to try to stay on Airtable for my backend and I must therefore take into account the new standards that you will apply by February 2024. Indeed, I 'uses the plugin on my gatsby site, "gatsby-plugin-airtable", with a version of Gatsby V4.25.7 and this will be a first for me to make use of Token or OAuth system. Unfortunately, I have "little" information regarding the integration of this possible data via this plugin. For now, my API keys are stored in an .env file and imported via the dotenv package into my gatsby-config.js.

So I have 2 main questions:

1 should I favor the Personal access tokens API or OAuth integration?

2 If using the Personal access tokens API is preferable, or easier to set up, should I simply change my API key to the value of the Token key inside my .env file?
Before:

 

 

 

 

const path = require("path")

// Initialize dotenv
require("dotenv").config({
	path: `.env.${process.env.NODE_ENV}`, // or '.env'
})

module.exports = {

	// Plugins Configuration
	plugins: [
		// Data Configuration
		{
			resolve: `gatsby-source-airtable`,
			options: {
				apiKey: process.env.AIRTABLE_API_USER_KEY, // may instead specify via .env file
				tables: [
					// My Table's database configuration
				],
			},
    },
    // ... Other plugin gatsby
	],
}

 

 

 

 

After:

 

 

 

const path = require("path")

// Initialize dotenv
require("dotenv").config({
	path: `.env.${process.env.NODE_ENV}`, // or '.env'
})

module.exports = {

	// Plugins Configuration
	plugins: [
		// Data Configuration
		{
			resolve: `gatsby-source-airtable`,
			options: {
				apiKey: process.env.AIRTABLE_API_PERSONAL_ACCESS_TOKEN, // may instead specify via .env file
				tables: [
					// My Table's database configuration
				],
			},
    },
    // ... Other plugin gatsby
	],
}

 

 

 

Is this what I need to do, or do I need to configure an Aitable.js file (the configuration of which I find rather complex).

If the case of OAuth2 is preferable, can you explain to me more clearly its implementation in my Gatsby project since I also use Zapier for the Triggers of my databases? Indeed, I also have to take into account these actions that perform a build on Netlify.

As for the data, it is read-only on the website. Airtable can only be accessed through your website's admin console to update data. There is no login provided for users given that it is a simple business showcase site. https://www.capriati.ch. Furthermore, if I had chosen your CMS it is for its ease of use for my client not being comfortable with CMS like WordPress but finds yours similar to the Microsoft Excel system, which he finds more comfortable to use. It would be a shame for him to have to change.

Thank you so much.

Thank you so much.

0 Replies 0