Closed ConnieZi closed 1 year ago
I am also getting "401 Unauthorized" errors when running the sample code from deepai.org / npmjs.com
Hello @danielrhodeswarp and @ConnieZi,
Thank you for bringing this to our attention. Based on the details provided, it seems you might be encountering this "401 Unauthorized" error due to the usage of a demo API key quickstart-...
. The demo API keys have limited uses and once they exceed those uses, they return a 401 error.
To resolve this:
Please sign in to obtain a fresh API key or ensure that your API key has available uses left. Replace the old API key in your code with the fresh one. Test the functionality again. If you encounter the same issue even after trying with a new API key, please open a new issue with the relevant details, and we'll be more than happy to assist you further.
Closing this issue for now. Thanks for using our platform, and let us know if you have any other questions or concerns.
SUMMARY: Used the example code and the quick-start API key to make an API call to the text generator, but got 401 DESCRIPTION: I am trying to embed some interactions with Deep AI in an Angular application(though this won't affect how the API code should perform). The code of calling the API is binded with a button, so that I can test the functionality by clicking the button. When I clicked the button(make the API call) in a normal Chrome browser, it failed with 401. When i clicked the button in an incognito Chrome window, it worked for several times, but most of the time, it failed with 401.
REPRODUCTION STEPS: js/ts file:
html file:
OBSERVED BEHAVIOR: