Updating ChatGPT Plugin to Use 'State'

Hello everyone,

I am currently in the process of updating my ChatGPT plugin. The challenge I am encountering revolves around the use of parameters. The current implementation uses the ‘code’ parameter, but based on the most recent documentation, it seems that I need to replace ‘code’ with the ‘state’ parameter.

However, it’s not entirely clear to me what the key differences are between ‘state’ and ‘code’, and how this change could potentially impact my current implementation.

Does anyone have experience with this situation, and if so, could you offer some advice?

Let me know if this helps:

Thank you Kevin, so my code is below. What should I change ?

print("OAuth key value pairs from the ChatGPT Request: ", kvps)
url = kvps["redirect_uri"] + f"?code={OPENAI_CODE}"

url = kvps[“redirect_uri”] + f"?code={OPENAI_CODE}“+f”&state={OPEN_AI_STATE}"

Should be something like that :slight_smile:

1 Like