dalle2-in-python icon indicating copy to clipboard operation
dalle2-in-python copied to clipboard

Prevent API scope error

Open kilianso opened this issue 2 years ago • 6 comments

Hey there 👋 Nice project! I just ran into a missing_scope error and after some research, I read that OpenAI automatically changes API keys when they detect access from external domains.

Same has been reported on the Node project. https://github.com/ezzcodeezzlife/dalle-node/issues/13

However, changing the token manually is of course a solution but i was wondering if there's a way to automate it. In a production app, we would need a way to retrieve and renew it programmatically. Any ideas?

kilianso avatar Aug 07 '22 20:08 kilianso

Thanks you for your first issue in dalle2-in-python

github-actions[bot] avatar Aug 07 '22 20:08 github-actions[bot]

For the text models (GPT-3) OpenAI released well-documented API and you can get permanent API key for yourself. I assume there will be same situation once they release DALLE-2 to the public. So we all have to wait to get this functionality without manual retreiving of access tokens

kv-crosstech avatar Aug 11 '22 12:08 kv-crosstech

I still have this issue with a permanent access token :

{
  "error": {
    "message": "Your key is missing a required scope: app.labs",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_scope"
  }
}


ezawadzki avatar Oct 19 '22 10:10 ezawadzki

@ezawadzki you have to use your temporary bearer key like explained in the readme

ezzcodeezzlife avatar Oct 19 '22 12:10 ezzcodeezzlife

Oh ! thanks @ezzcodeezzlife , I read your documentation too quickly. Hope we can use one day permanent tokens.

ezawadzki avatar Oct 19 '22 13:10 ezawadzki

Hope we can use one day permanent tokens.

currently looking into this 🚀

ezzcodeezzlife avatar Oct 19 '22 13:10 ezzcodeezzlife