kyi(mode, scope, accessToken, options?)
Browser only. Opens the widget and returns a KYIWidget.
'drawer'
required
How the widget is displayed.
'kyi' | 'asset-list' | 'wallet-list'
required
Which screen the widget opens on.
string
required
Token generated by your backend.
KYIOptions
Optional callbacks.
accessToken is empty, or if mode or scope isn’t one of the values above.
KYIOptions
KYIWidget
generateToken(options)
Server only, Node.js 18+. Returns a Promise<string> with a signed HS256 JWT.
string
required
Your partner ID. Becomes the
iss claim.string
required
Your
SECRET_KEY.string
required
Your internal, stable, never-reused ID for the user. Becomes the
sub claim.number
default:"3600"
Lifetime in seconds.
issuer, secretKey or userId is empty.
Not using Node.js
Sign an HS256 JWT with yourSECRET_KEY and these claims:
token.py