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
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...