How to use a secret password in UE (only server should know it)

Hello all. I have a multiplayer game, and would like to make some HTTP POST requests to update player statistics. However, I only want to do these requests from the server, and would like to send a password in the body of the request to process it. But I don’t want to hardcode the password in UE; I was thinking of including the password in an encrypted CSV file, and then decrypting the file in my C++ code to get the password and use in my HTTP request. But I was thinking that if players are able to see this decryption process, then they could easily get the password themselves.

What are some solutions to this?

Hello. Assuming you only want to be making this request from a dedicated server, that only you (other admins) have access to. Then you put all the sensitive information on that server. Even a simple .txt file will do.
Then in your UE application you read that file to get the password or anything else.

I see, so the server build will contain the .txt file, but the shipping build will not?

Exactly. The game build doesn’t have to include the .txt file at all. It just has to look for it in some location. And on the server you will make sure it’s there. If it’s not found - the request should be skipped.

Got it. Thanks @Seishoku !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.