I want to get users location server side. Looking at documentation the locale.get() doesn't ask for user ID or any other details? What users locale will it provide ?
I am trying to restrict access to information based of user location. A request document is created in a collection and information is populated in the document basis country by a cloud function.
That API grabs the IP address of the requester and looks up the location based on the IP. If you're making the API call from some other server the request will come from your server rather than the end user.
So calling locale.get server side (using appwrite functions) would return location of the server then ? Not sure I understand the use case of that..
So ideally locale should be used client side only
Yes. The common use case is for api calls to be made from the client
[Solved] How to use Locale service, server side ?
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...