Search code examples
javaapi-keysteam-web-api

How to hide Steam Web API key?


So I'm using my personal steam web api key in a project and its my first time using an api key in a program. I don't have any idea about the safe-use of this key in terms of hiding it.

Could somebody guide me in this aspect? I'm developing in Java.


Solution

  • One suggestion is, put your API key in a different file and read it in at the beginning of you program and assign it to a variable. Also, if you are uploading to github dont forget to gitignore your api key file!