You Need to Protect Your API Keys in p5.js. Here's How.

Subscribers:
7,360
Published on ● Video Link: https://www.youtube.com/watch?v=UbeV-txNvMQ



Duration: 2:45
187 views
13


You could get charged for excessive downloads if you save your API key in a p5 web editor sketch. It's easy for someone to find your key and use it in their own application. You need to save your keys in local storage (the browser's memory). Then you can retrieve the key from local storage in your sketch and safely save the sketch.

Storing a key example with instructions:
https://editor.p5js.org/StevesMakerspace/sketches/uE9m94aQD

My satellite image art video:
https://youtu.be/KytAyWVtr_8

Join my Discord: https://discord.gg/FSW6zzU

Follow me on Twitter: https://twitter.com/SteveMakerspace







Tags:
p5js api
p5js api key
p5js local storage
p5js storeItem
p5js
p5js api examples
p5js twitter api
api shiffman
api train
api coding train
p5js api risk
p5js api exposure
p5js data and apis