So I recently learned what the Secret data type is, and apparently it is what’s returned by HttpService:GetSecret(), but I’m not entirely sure what this does. The documentation page on it is blank besides the fact that it takes a string as a parameter.
If anyone knows, could you please inform me as to what it does? Thank you and have a wonderful day!
“secret” is a new~ish datatype for storing variables outside of your code. They are encrypted and used for sensitive data. If you use github, they should function similarly to those. So basically they are mainly used to store sensitive API keys for https requests (one example).
An API key is a password for two programs to communicate with eachother. So for example, lets say you have a website that sends data to your roblox game. You would only want yourself sending data to your game, and not datasigh because I could tamper with it. So an API key is a password that confirms the data is coming from the correct place. These keys have to be put in a secret because if you set them like this local SECRET_PASSWORD = "chickenNugget" you risk exploiters finding the key, and pretending to be you. Or any amount of mistakes that could happen.