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

const client = new SnagSolutions({
  apiKey: 'My API Key',
});

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);
{
  "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<uuid>
required

The ID of the website

Example:

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

organizationId
string<uuid>
required

The ID of the organization

Example:

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

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

The wallet address of the user

Example:

"0x1234567890abcdef1234567890abcdef12345678"

verificationData
object

The verification data of the user walletAddress

userId
string<uuid>

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

Schema for a connect users response

walletAddress
string
required

The wallet address of the user

id
string<uuid>
required

The ID of the user

Example:

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

createdAt
string<date-time>
required

Timestamp when the user was created

Example:

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

updatedAt
string<date-time>
required

Timestamp when the user was last updated

Example:

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