POST
/
api
/
users
/
connect
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.users.connect({
    organizationId: '123e4567-e89b-12d3-a456-426614174001',
    walletAddress: '0x1234567890abcdef1234567890abcdef12345678',
    walletType: 'evm',
    websiteId: '123e4567-e89b-12d3-a456-426614174000',
  });

  console.log(response.id);
}

main();
{
  "walletAddress": "<string>",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2023-10-01T12:34:56Z",
  "updatedAt": "2023-10-05T15:30:00Z"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
Body

Schema for a connect user schema

websiteId
string
required

The ID of the website

Example:

"123e4567-e89b-12d3-a456-426614174000"

organizationId
string
required

The ID of the organization

Example:

"123e4567-e89b-12d3-a456-426614174001"

walletType
enum<string>
required
Available options:
evm,
solana,
imx,
sui,
ton
walletAddress
string
required

The wallet address of the user

Example:

"0x1234567890abcdef1234567890abcdef12345678"

verificationData
object

The verification data of the user walletAddress

userId
string

The ID of the user to whome this wallet is being connected

Example:

"123e4567-e89b-12d3-a456-426614174001"

confirmDisconnect
boolean

Whether to confirm the disconnect

Example:

true

Response

200
application/json
200

Schema for a connect users response

walletAddress
string
required

The wallet address of the user

id
string
required

The ID of the user

Example:

"123e4567-e89b-12d3-a456-426614174000"

createdAt
string
required

Timestamp when the user was created

Example:

"2023-10-01T12:34:56Z"

updatedAt
string
required

Timestamp when the user was last updated

Example:

"2023-10-05T15:30:00Z"