Connecting GPT to Visual Studio

I’ve tried connecting my Visual Studio with codeGPT, but it wants a API key and I can’t seem to find it. It will ask me to login even though I’m already logged in. Then if I do try to login when it prompts me to, I get an error saying Invalid authorization code. How can I get the API key?