Links
👩‍💻

API Reference

Control TribesKit programmatically
Programmatic control over the TribesKit side panel allows developers to seamlessly manage conversations, control user logins, and perform other essential operations. The provided APIs offer granular control to cater to specific use cases. Below is a detailed breakdown of the available API functions:

User Login

Using a specified wallet address, you can programmatically log the user in to chat
window.tribes.login({
"walletAddress": "0xE69F609C75f8640fA034166c63929f2875C01343"
});

Chatting

Chat with a Wallet Address

For initiating a chat with a specific wallet address:
window.tribes.open({
"type": "dm",
"walletAddress": "0xE69F609C75f8640fA034166c63929f2875C01343"
});

Chat with a Safe™️ multisig group:

window.tribes.open({
"type": "safe",
"chainId": 1, // only Ethereum and Polygon are supported
"safeAddress": "0xde701b6ad35e4260858cdc1cbbd67514585227cc"
});

Chat with an EVM based NFT-gated community

window.tribes.open({
"type": "eth_nft",
"chainId": 1, // only Ethereum and Polygon are supported
"walletAddress": "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d" // CryptoKitties
});

Manage the TribesKit Side Panel

To programmatically close the side panel:
window.tribes.close();
Alternatively, if you wish to toggle (open or close based on the current state) the side panel, use:
window.tribes.toggle();
This comprehensive API suite ensures you can finely tune TribesKit's behavior within your application for an optimal user experience. Ensure to call the appropriate methods based on your use-case scenario.
Last modified 5mo ago