π Web3 Auth APIs
Below is a list of all the available API endpoints with usage examples.
Note: All API requests must include the header x-api-key: <YOUR_ACCESS_KEY>
to access your Web3 Auth app. This key identifies your app and is required for all API interactions.
π 1. GET /networks
Retrieve Supported Networks
Returns a list of supported blockchain networks and associated wallets based on the provided access key.
β Request
Method: GET
β
π Response
[
{
"Id": 1,
"NetworkName": "bsc",
"ChainId": "56",
"WalletResponses": [
{ "Id": 1, "WalletName": "metamask", "NetworkId": 1 }
]
},
...
]
π€ 2. POST /handshake
Start Wallet Authentication
Initiates the authentication process by generating a signable message based on the wallet's address and selected network.
β Request
Method: POST
βBody:
{ "NetworkId": 3, "WalletAddress": "YourPublicKey" }
π Response
{
"info": "2025-04-23T12:06:32.505Z",
"Message": "Sign this message for authenticating with your wallet.Nonce:b5aa46aa3e9642c19ae6873a8da8a0bf",
"messageType": 2
}
Note: Use the message in Message
and request the wallet to sign it.
β
3. POST /verify
Verify Wallet Signature
Verifies the signed message from the wallet and issues a JWT token on success.
β Request
Method: POST
βBody:
{
"WalletAddress": "YourPublicKey",
"Signature": "SignatureReturnedByWallet",
"NetworkId": "3"
}
π Response
{
"Result": "<JWT_TOKEN>",
"info": "2025-04-23T12:07:47.265Z",
"Message": "SUCCESS",
"messageType": 2
}
π€ 4. GET /profile
Get Authenticated User Profile
Returns the authenticated user's data.
β Request
Method: GET
βHeaders:
Authorization: Bearer <JWT_TOKEN>
π Response
{
"id": "user_id",
"wallet": "wallet_address",
"createdAt": "...",
...
}
βοΈ 5. POST /profile
Update User Profile
Updates the user's profile data.
β Request
Method: POST
βHeaders:
Authorization: Bearer <JWT_TOKEN>
Body:
{
"email": "[email protected]",
"nickname": "john doe"
}
The shape of the request body depends on your app's configured user data schema in the Djuno Panel.
πΌοΈ 6. GET /profile/avatar
Get User Avatar
Fetches the user's avatar image file (if enabled in app settings).
β Request
Method: GET
βHeaders:
Authorization: Bearer <JWT_TOKEN>
π¦ Response (Blob)
JS Example:
const res = await httpClient.get('/profile/avatar',
{
headers: { Authorization: `Bearer ${token}` },
responseType: 'blob'
}
);
const blobUrl = URL.createObjectURL(res.data);
ποΈ 7. POST /profile/avatar
Upload or Update Avatar
Uploads or updates the user's avatar image.
β Request
Method: POST
βHeaders:
Authorization: Bearer <JWT_TOKEN>
Body (FormData):
const formData = new FormData();
formData.set("img", file);
await httpClient.post('/profile/avatar', formData,
{ headers: { Authorization: `Bearer ${token}` } }
);
Conclusion
While you can interact with the Web3 Auth API directly using HTTP requests, we highly recommend using one of our official packages for a smoother development experience:
@djuno/web3auth-sdk
A lightweight TypeScript SDK for seamless API integration.@djuno/web3auth-hook
React hooks are built on top of the SDK to manage authentication logic with ease.@djuno/web3auth-ui
Plug-and-play React UI components that simplify the entire auth flow.
These packages abstract away low-level API details and help you get up and running faster with less boilerplate.