#[SOLVED] Cloud - USERS REST API - Appwrite-Key - Is it ok to use it from the client?

1 messages · Page 1 of 1 (latest)

jade zinc
#

Trying to get the User's info via rest api and by the userId from session.
I'm getting ERR_ABORTED 401 (Unauthorized)

From the docs I read I need to send via a GET request those headers:
GET /v1/users/{userId} HTTP/1.1
Content-Type: application/json
X-Appwrite-Response-Format: 1.4.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2

I finally succeeded
My question is regarding the Appwrite-Key - in the docs it says:

API key used for server authentication. Your API key is a secret, do not use it in client applications.

I'm using it from the client to make the api call..so this is a security risk?
Thanks

https://appwrite.io/docs/apis/rest

Discover the Appwrite REST API for building robust and scalable applications. Access detailed documentation on REST endpoints, authentication, and data management.

jade zinc
#

Cloud - USERS REST API - Appwrite-Key - Is it ok to use it from the client?

jade zinc
#

@slender vapor Hi, can you please help ? appwritemagic

shut meadow
jade zinc
shut meadow
jade zinc
#

So, what should I do in this case?

shut meadow
shut meadow
jade zinc
#

I will answer in a few minutes, thank you for your patience

jade zinc
#

I'm making an app that will use Appwrite's all APIs. Auth, Database and storage. Maybe, functions too.
I don't want to code and eventually find that I made security risks all over.
So, if you think I should make some kind of proxy server (Nodejs) that will have all the API keys stored there, and the client will make requests to that proxy server, I will do it.

shut meadow
jade zinc
shut meadow
#

Using the account API?

jade zinc
shut meadow
jade zinc
shut meadow
jade zinc
jade zinc
shut meadow
jade zinc
shut meadow