Help

Re: Where to put API key

2306 1
cancel
Showing results for 
Search instead for 
Did you mean: 
ben_jones1
4 - Data Explorer
4 - Data Explorer

# Shell: $ export AIRTABLE_API_KEY=YOUR_API_KEY

Where should I put this?
This is probably an obvious question, but I don’t know it.

Thanks

6 Replies 6

It is more a matter of where to not put the API key. Don’t put it anywhere publicly accessible, including anything accessible to the client.

I personally decided to store my API key on my server in a file in a directory higher up than the root of my website.

ahttps://gyazo.com/e888b06329020b270a62d491ba671ebd
ahttps://gyazo.com/b78f93e2cf31cd7eef2327164486cf09

No, I mean I get an error after putting everything except the part where it says Shell:
I just want to know where to put `$ export AIRTABLE_API_KEY=…’

Sorry I didn’t understand your question.

That statement just stores your api key in a variable, making it available to whatever other file imports it. Put it in a file that is in a secure location that is also accessible to your other JavaScript files.

ahttps://gyazo.com/8e3f573e2f9442becce30f543e7780f9

I’ve got it in the JS file I’m using, and it’s still giving me the same error, this is the only JS file im using

Ben,

In this community there are some really bright users deeply familiar with Airtable, it’s API, and a variety of scripting environments. To get good support from a community like this concerning software development issues, it’s important that you share many insights concerning and including:

  • The scripting environment (python, javascript, script block, etc)
  • The server environment where the script is actually running
  • The Airtable data model (field names, and data types)

When I see a URL like this I have no idea what you’re referring to. Is it a link that should show me something?

Once again - I have no context to help you debug this.

doithuong
4 - Data Explorer
4 - Data Explorer

I do not understand the purpose of your question yet? because it’s simply the key to a file in js that anyone can get.