Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

Error: Request failed with status code 401

Open Nerdydroids opened this issue 1 year ago • 7 comments

Hello, someone else experiencing this error? Do you have any solution for it?

Nerdydroids avatar May 26 '23 13:05 Nerdydroids

Maybe api key incorrect ?

IterNobody avatar May 26 '23 16:05 IterNobody

same error. API key copied directly from OpenAI CleanShot 2023-05-27 at 14 51 18@2x

DmacMcgreg avatar May 27 '23 17:05 DmacMcgreg

Same issue

vanetreg avatar Jun 16 '23 09:06 vanetreg

Same issue here, anyone managed to fix this ?

Karimium0 avatar Jun 18 '23 16:06 Karimium0

same issue +1

uzair-7886 avatar Jun 19 '23 17:06 uzair-7886

tried three different api keys from three different accounts but still not working

uzair-7886 avatar Jun 19 '23 17:06 uzair-7886

not same issue, my error code is 404, and i change the llm to gpt-3.5-turbo-0613 then it works

TheTinkerJ avatar Jun 25 '23 23:06 TheTinkerJ

same issue

abslearn avatar Jul 24 '23 09:07 abslearn

401 error message indicates that your authentication credentials are invalid. This could happen for several reasons, such as:

  • You are using a revoked API key.
  • You are using a different API key than one under the requesting organization.
  • You are using an API key that does not have the required permissions for the endpoint you are calling.

Result: image

Reference: OpenAI error code 401

chungyau97 avatar Jul 27 '23 07:07 chungyau97

@chungyau97 this is not the case, since I've tried with multiple fresh keys, please re-open.

DmacMcgreg avatar Jul 27 '23 11:07 DmacMcgreg

Could you share your Flowise configuration?

  1. Node version
  2. Method of setting up
  3. Device OS

chungyau97 avatar Jul 27 '23 11:07 chungyau97

@chungyau97

  1. 16.17.1
  2. npm i -g flowise
  3. MacOS 13.4

DmacMcgreg avatar Jul 27 '23 12:07 DmacMcgreg

My side is working fine. I tried deleting one character from the key, and it shows 401, which is correct. macOS 13.2.1 (22D68)

  1. npm install -g flowise
  2. npx flowise start
image

kaisiant avatar Jul 28 '23 16:07 kaisiant

@DmacMcgreg,

Seem like your problem is related to the older version of NodeJS.

Please proceed to download the LTS version of it. 18.17.0 LTS If you're adventurous enough, give NVM a try. This is to manage different version of NodeJS

chungyau97 avatar Jul 29 '23 07:07 chungyau97

Hi @chungyau97 ,

Getting 401 status code as shown below in server error logs:

2023-08-08 05:30:23 [ERROR]: [server]: Error: Request failed with status code 401 and body {"statusCode":401,"message":"Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired."}

Azure OpenAI keys are valid and not expired.

Request you to please check the detailed issue here.

Please let us know how to resolve the same.

NISHANTSHRIVASTAV avatar Aug 08 '23 05:08 NISHANTSHRIVASTAV

Hi @NISHANTSHRIVASTAV,

I will close this issue as I replied in #710.

chungyau97 avatar Aug 08 '23 07:08 chungyau97

How I was able to fix:

  1. Went to https://platform.openai.com/account/billing/overview and put some money in order to have credits to call OpenAI API
  2. Created new API key for OpenAI
  3. In Flowise make sure you have the same API keys in Chat Open AI and OpenAI Embedding

This was my way.

NikolayBG avatar Aug 25 '23 13:08 NikolayBG