Manage your keys
Recommendations to manage your api keys
Don't hardcode your keys
It is very inadvisable to hardcode your api keys in your application code. These keys are confidential information that allow you to use your account, you must not share them. I recommend that you use a configuration because it will allow you to share your program without risking to compromise your account.
How to properly use a configuration?
Using a configuration allows you to share your code without having to change it first, but it could be annoying if you need to change your configuration before you share it. I advise you to use a template and copy it automatically when there is no config. You can use various configuration formats, I love toml, yaml is fine, json works.
Example using toml
Code
Config
Last updated
Was this helpful?