Use an OAuth2/OpenID connect flow to authorize users & interact with the Xumm API's / SDK

If you want to sign in users using an OAuth2 / OpenID Connect flow, you can do so using the Xumm platform OAuth2 provider. You can read more about Xumm as OAuth2 provider here: User Sign In (Xumm as identity provider)

The JWT obtained with the OAuth2 Code / Implicit flow can then be used to call the Xumm API JWT endpoints documented in this section.

The PKCE flow (which is the new industry standard and replaces the Implicit flow) is also available & ships with an easy to use SDK. Demo - Source, Docs and SDK: npm version

Use the SDK through the OAuth2 flow

See this example & docs

Directly use the SDK (JWT obtained through xApp)

// With existing JWT (e.g. from OAuth2 Sign In or xApp JWT:
// Note: use `xumm-oauth2-pkce` (npm) yielding the Sdk for OAuth2
// Use `xumm-xapp-sdk` (npm) to obtain the JWT & interact with Xumm in xApps

const { XummSdkJwt } = require('xumm-sdk')
const myJwt = 'xxxx.yyyy.zzzz'

const main = async () => {
  const Sdk = new XummSdkJwt(myJwt)

  const payload = await Sdk.payload.create({
    TransactionType: 'Payment',
    // More here