Skip to main content
Glama
wsapi-chat
by wsapi-chat

whatsapp_get_qr_code

Generate a QR code to log into WhatsApp through the WSAPI service, enabling AI assistants to access messaging and account management features.

Instructions

Get QR code for WhatsApp login.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The ToolHandler for 'whatsapp_get_qr_code' that fetches the QR code via wsapiClient.get('/session/login/qr/code') and returns it.
    export const getQRCode: ToolHandler = { name: 'whatsapp_get_qr_code', description: 'Get QR code for WhatsApp login.', inputSchema: { type: 'object', properties: {} }, handler: async () => { logger.info('Getting QR code'); const result = await wsapiClient.get('/session/login/qr/code'); return { success: true, qrCode: result, message: 'QR code retrieved successfully' }; }, };
  • src/server.ts:53-79 (registration)
    Registration of all tools including sessionTools (which contains whatsapp_get_qr_code) into the server's tools Map.
    private setupToolHandlers(): void { logger.info('Setting up tool handlers'); // Register all tool categories const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ]; toolCategories.forEach(category => { Object.values(category).forEach(tool => { if (this.tools.has(tool.name)) { logger.warn(`Tool ${tool.name} already registered, skipping`); return; } this.tools.set(tool.name, tool); logger.debug(`Registered tool: ${tool.name}`); }); }); logger.info(`Registered ${this.tools.size} tools`); }
  • src/server.ts:19-19 (registration)
    Import of sessionTools containing the whatsapp_get_qr_code handler.
    import { sessionTools } from './tools/session.js';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wsapi-chat/wsapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server