WhatGHL icon

WhatGHL

Send actions to WhatGHL API

Actions42

👥 **GROUPS** · Get Invite Code

AI-generated

Summary

Retrieve the invite code for a WhatsApp group using the specified group identifier and an optional session selection method.

Inputs

  • Group ID (required) — The unique identifier of the WhatsApp group to get the invite code for. It can be in '@g.us' format or a numeric ID.
  • Session Mode — Defines how the sender session is selected for the action. Options include 'Auto', 'By Session Name', or 'Select Session'.
  • Session — Specifies the session to use when 'Select Session' mode is chosen. Shows available sessions for the API key.
  • Session Name — Specifies the WAHA session name to use when 'By Session Name' mode is selected.

Output shape

a single JSON object containing the invite code details for the specified group.

Requires valid WhatGHL credentials with a correct baseUrl and apiKey. The operation will throw an error if the groupId is missing. Session selection affects which sender session the action utilizes.

Examples

Example 1: Get the invite code for a group using automatic session selection.

Set 'Group ID' to the target group like '1234567890@g.us' and use default 'Session Mode' (Auto).

Example 2: Get the invite code for a group using a specific session name.

Set 'Session Mode' to 'By Session Name' and specify the 'Session Name'. Provide the 'Group ID' for which to fetch the invite code.

Links

Discussion