Skip to content
Back

[Solved] Cannot access REST API "Request failed with status code 401"

  • 0
  • Web
Axentioi
27 Jun, 2023, 16:05

Any idea why this is happening?

TL;DR
The user was unable to access a REST API and received a "Request failed with status code 401" error. Eventually, the issue was solved, but it is not clear how it was resolved. The user mentioned using ReactNative and encountering problems with the expo SDK. They also asked about adding the x-appwrite-project header and suggested using the Appwrite web client. It is unclear if these suggestions helped resolve the issue. The user also mentioned finding documentation from version 1.3 instead of the cloud. No solution is provided in the thread.
Axentioi
27 Jun, 2023, 16:11
Axentioi
27 Jun, 2023, 16:11

userId, email and password sent, I get 401

Binyamin
27 Jun, 2023, 16:12

You're using REST to make the API request?

Axentioi
27 Jun, 2023, 16:17

yes

Axentioi
27 Jun, 2023, 16:17

actually found the other documentation from the 1.3 instead of cloud

Axentioi
27 Jun, 2023, 16:17

but I'm not sure what the hostname is

Binyamin
27 Jun, 2023, 16:18

Have you added the x-appwrite-project header to the request?

Why don't you use the Appwrite web client?

Axentioi
27 Jun, 2023, 16:20

i am using that, but I cannot get the schemas in some cases and on the sdk doesn't work well for the expo

Binyamin
27 Jun, 2023, 16:20

Ohh, Got you. This is in ReactNative project

Axentioi
27 Jun, 2023, 16:20

yhh

Axentioi
27 Jun, 2023, 16:20

but got it

Axentioi
27 Jun, 2023, 16:20

thanks 😄

Binyamin
27 Jun, 2023, 16:21

So, it works now?

Axentioi
27 Jun, 2023, 16:22

yup

Binyamin
27 Jun, 2023, 16:22

<a:agooglethumbsup:635256484682530825>

Axentioi
27 Jun, 2023, 16:22

Thanks!

Axentioi
27 Jun, 2023, 19:16

[Solved] Cannot access REST API "Request failed with status code 401"

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more