User

User Functions

Change user's id

Description

Change the ID of the user's wallet. A user is unique on Tweed's backend using the PlatformId|UserId, so the userId needs to be unique in the platform. The old userId will become unavailable on the platform immediately after the change.

Parameters

NameTypeRequiredDefaultDescription

userId

String

✔️

current user's id id

newUserId

String

✔️

new user's id

Return type

Promise<string>

Usage Example

const newUserId = await sdk.user.changeId({
  userId: 'old-user-id',
  newUserId: 'new-user-id',
})

Last updated