Skip to main content

API Reference

The Web3 Auth API allows you to authenticate users via wallet-based login across multiple networks (EVM and Solana supported)

Djuno Support avatar
Written by Djuno Support
Updated today

πŸ“˜ 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:

These packages abstract away low-level API details and help you get up and running faster with less boilerplate.

Did this answer your question?