I made an app on the WebGL platform integrating ChatGPT to interact with the user. The problem I have now is I’m hardcoding my API token on the file, something like this:
public string secretkey = "p2lbgWkFrykA4Q......zmc5BNzIABq";
I know it’s bad practice and people can easily see this but is there a way to hide or encrypt it so it’s not easily visible? I’m not saying to make it secure because, obviously, if the token is in the file, it can be grabbed, but just to make it a little bit harder for people to see the token.
I tried that, too once the web socket is called, the value needs to be stored locally for the GPT to work, and that variable exposes this key. is this what u are saying, or is something different?
Did you check the terms of service? Very likely to be against the TOS to provide other users access to ChatGPT via your own API key. Typically, if you act as a “reseller” of sorts it’s either outright forbidden, or you have to pay premium.
i mean that server would do all the API requests and just pass the answers/questions as a “middleman”. (then webgl doesnt need to know anything, it just uses your server to send questions & receive replies)