Help

How can I hide my API Key without Node.js

3371 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Tom_Phillips
4 - Data Explorer
4 - Data Explorer

Node is unavailable on the server we’re using. So, is there another way to hide the API key using either Vanilla JS or PHP?

Thanks!

3 Replies 3

First of all, you can’t use that API on any client-side JS library or a framework, Because it’s shown everywhere on web and anyone can able to access your data.

Another option is you can use some server side language like NodeJS, PHP, Ruby etc.
Official API client:

  • JavaScript: airtable.js (Node.js + browser) - This is best if your platform is NodeJS

Community-built API clients:

You can still find out more from Github.

If you cannot use node, you cannot run JavaScript on the server.

If you use PHP on the server, you can put the API key in an environment variable or store it in a directory outside of the website directory.

I’d highly recommend looking into serverless functions here @Tom_Phillips

Here is a quick tutorial using our service - but you can also set up these functions using Node.