is there any way to send a token without session-b...
# general
is there any way to send a token without session-based management. like, if i just want to verify a clientID and secret instead?
Yes. There is.
Which backend SDK will you be using?
NodeJS + Hapi
i was able to set it up with the Session and verifySession from the recipe, but i guess it doesn't work in this use-case.
So you can use the JWT only recipe to issue JWTs as you like
ah, i didn't see that recipe on the site.
do you have a link?
Yea. it's not mentioned explicitly on the site cause it comes under machine to machine and that's not fully done yet. So we didn't add this. But what you want to do is something like:
Copy code
import { createJWT } from "supertokens-node/recipe/jwt";

    { someKey: "someValue" }, // JWT payload
).then(result => {
    if (result.status === "OK") {
        let jwt = result.jwt;
        // your logic with the JWT
    } else {
        throw Error("Should never come here");
WOuld this work for you?
it might! do you have a link to the where the implementation for the JWT-only recipe is on GitHub?
awesome! i'll look into this and get back to you? thanks for the help so far,
Sure! Feel free to ask further questions on this server.
@User i'm getting this error:
Copy code
UnhandledPromiseRejectionWarning: Error: SuperTokens core threw an error for a POST request to path: '/recipe/jwt' with status code: 400 and message: Field name 'validity' is invalid in JSON input
Hmm. Can you please open an issue about this on our GitHub?
@User could you also post the code where you are getting this error?