What is the recommended way to pass user API key to another service?

Summary

I want to enable users to enter their own API key (e.g. OpenAI) so that they can submit requests that they will pay for.

Requirements

  1. Allow entry of API key.
  2. Pass to python function which decrypts it and sends it as a parameter in a call to the API service.

Ask

What is the recommended way to do this?

1 Like

Looks like this app did it using a one way hash + encrypted session state storage. See the FAQ β€œHow does GPT Lab ensure the security of my information?”. The details are not provided.

1 Like

Unless you need to store them in your data store, just use session state variables.

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