AuthSessionsGet and revoke auth sessionsAsk a question|Copy page|View as Markdown|More actionsGet a session Check the status of an auth session: 1import { Gwop } from "@gwop/sdk";23const gwop = new Gwop({4 merchantApiKey: process.env.GWOP_MERCHANT_API_KEY,5});67const { result: session } = await gwop.authSessions.get({8 sessionId: "sess_abc123",9});1011console.log(session.status); // "active", "revoked", or "expired"12console.log(session.sub); // "base:0x742d..." — wallet identity13console.log(session.chain); // "base" or "solana"14console.log(session.walletAddress); // "0x742d35Cc..."15console.log(session.createdAt); // Session creation timestamp16console.log(session.expiresAt); // Session expiry17console.log(session.revokedAt); // null if active, Date if revoked Session fields FieldTypeDescriptionsessionIdstringSession identifierstatusstringactive, revoked, or expiredsubstringWallet identity ({chain}:{address})chainstringbase or solanawalletAddressstringRaw wallet addresscreatedAtDateWhen the session was createdexpiresAtDateWhen the session expiresrevokedAtDate | nullWhen the session was revoked, or null Revoke a session Revoke an active session (logout): 1const { result } = await gwop.authSessions.revoke({2 sessionId: "sess_abc123",3}); Errors 1import * as errors from "@gwop/sdk/models/errors";23try {4 await gwop.authSessions.get({ sessionId: "sess_invalid" });5} catch (err) {6 if (err instanceof errors.ErrorResponse) {7 err.data$.error.code; // "SESSION_NOT_FOUND"8 err.data$.error.message; // "Session not found"9 err.statusCode; // 40410 }11} Next step JWKSVerify JWTs locally without calling the API on every requestAuth OverviewFull auth flow, wallet identity, and what auth unlocks