Skip to main content
Glama
by wsapi-chat

whatsapp_get_qr_code_image

Generate a QR code image for WhatsApp login authentication. Use this tool to initiate WhatsApp session setup by scanning the QR code with your mobile device.

Instructions

Get QR code image for WhatsApp login.

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Defines the ToolHandler for 'whatsapp_get_qr_code_image', including name, description, empty input schema, and handler that fetches QR code image from WSAPI backend via wsapiClient.
    export const getQRCodeImage: ToolHandler = { name: 'whatsapp_get_qr_code_image', description: 'Get QR code image for WhatsApp login.', inputSchema: { type: 'object', properties: {} }, handler: async () => { logger.info('Getting QR code image'); const result = await wsapiClient.get('/session/login/qr/image'); return { success: true, image: result, message: 'QR code image retrieved successfully' }; }, };
  • src/server.ts:53-79 (registration)
    Registers all tools by iterating over tool category objects, including sessionTools which contains the whatsapp_get_qr_code_image handler, mapping them 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)
    Imports the sessionTools object containing the whatsapp_get_qr_code_image handler.
    import { sessionTools } from './tools/session.js';
  • Exports sessionTools object grouping session-related tools including whatsapp_get_qr_code_image for registration in the MCP server.
    export const sessionTools = { getSessionStatus, getQRCode, getQRCodeImage, getPairCode, logout };

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