
Hi @Arpan Pandey
Could you explain in more detail what you're trying to do?

I'm trying to create a CLI so client side things

But I need a JWT to use client-side auth

I don't know how to create a JWT without opening a browser

What version of Appwrite are you using?

Cloud

1.1.2

Okay mind if I ask why you're using JWT? Can't you use the normal email/password auth method?

After I get a session

With email password

How do I use it to perform actions on user's behalf?

Ah okay that's what you want to do. Okay let me just check this out real quick.

As far as I can see in the docs, there are no docs for REST.

Are you restricted to using REST, or can you use something else?

I can use GraphQL

Or anything that doesn't need a browser or native app

GraphQL is not available in cloud

Web, Flutter, Apple and Android are the only methods available for v1.1.2

So I should use external auth?

And then maybe link it using Auth0?

I didn't understand

I am saying I think I need to use an external auth provider

Ah yes. The current cloud version doesn't support what you need, so it's best to go for external auth.

Ok, thanks a ton!

you would have to call the create email session API manually and grab the cookie so that it can be used in the rest of the CLI tool.
See how we're extracting the cookie here: https://github.com/appwrite/sdk-for-cli/blob/b4619977eb95ca6650aa5291eb6a26d6bfa46eda/lib/client.js#L196
Recommended threads
- Client Error
Hi Appwrite Community. I've got the Problem, that when I want to define my client, it won't work. Can somebody help me? (Project ID has been removed due to pri...
- create project in organization from api-...
I need to create a project via api-rest, would there be a possible way?
- Is my approach for deleting registered u...
A few weeks ago, I was advised not to use the registered users' id in my web app. Instead, I store the publicly viewable information such as username and email ...
