Hey every one, I have some problem, I wanna respond UserId when the user login using email and password from Rest API and Create Email Session() only work in client server, how can I get UserId from Server side, Thanks
Once the user logs in, use account.get()
It returns an Account object, which includes the unique ID.
how to login in server side, I am confussed
in my Laravel I add Appwrite sdk via composer, but I can't find Create Email Session() method, its because it only valid for server side or ? can please help me
can i ask why you want to respond with the userId from the server-side?
when a user logs in, it returns a Session Object on the client which includes userId
For client side there are 4 SDK uses, unfortunately my client uses .NET frame work, so I decide to use REST API, so I create email and password field in this net application and request Rest API to this end point "/v1/account/sessions/email", BUT error "guest user, Authorization error", how can I create user session in this case ? I try to create custom API endpoint in server side using api_key, but in server side there is no createEmailSession() function, that why I ask this question.
Will you have any JavaScript?
no, I only use https request
server side php, client side .NET
client side .net...interesting...
So since there's no SDK (and even if there were, the SDK currently in progress is for server-side use), you'll need to make the API calls and manage the session manually. This should be helpful: https://appwrite.io/docs/rest#client-auth. Then, after you have a session, you can call https://appwrite.io/docs/client/account?sdk=rest-default#accountGet
The example has X-Appwrite-JWT, but you might want to use the cookie if you can
Thanks it help lot
can you tell me the progress .net sdk for server side, when it will release, thanks
I'm not sure about the timeline for a release, but you can follow along with https://github.com/appwrite/sdk-generator/pull/320 to stay updated
Recommended threads
- How to Display File in Web?
I'm trying to use Appwrite's Storage to store images and display them in my app, however when I use the `getFileView`, `getFileDownload` or `getFilePreview` met...
- Selfhosted Github App installation
I've followed this guide: https://appwrite.io/docs/advanced/self-hosting/configuration/version-control to connect GitHub to my self-hosted Appwrite instance (1....
- Project Paused Despite Daily Active Usag...
I noticed that my project was automatically **paused**, even though it is actively being used. The project is an **attendance application** that is used daily b...