> ## Documentation Index
> Fetch the complete documentation index at: https://developer.omni.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Enlace de invitación

> El enlace de invitación del grupo

## Concepto

El enlace de invitación del grupo.

> [!NOTE]
>
> El **canal** debe ser administrador del grupo; si no, `422` `provider_error` con el mensaje `The channel is not an admin of this group, so WhatsApp does not return its invite link. Make the channel an admin of the group, or ask a group admin for the link.`


## OpenAPI

````yaml es/groups/openapi.json GET /v1/channels/{channelId}/groups/{groupId}/invite-link
openapi: 3.1.0
info:
  title: Omni Z-API - Grupos
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io
security:
  - bearerAuth: []
paths:
  /v1/channels/{channelId}/groups/{groupId}/invite-link:
    get:
      tags:
        - Grupos
      summary: Enlace de invitación
      description: >-
        Devuelve el enlace de invitación del grupo. El canal debe ser
        administrador.
      operationId: getGroupInviteLink
      parameters:
        - name: channelId
          in: path
          required: true
          description: Channel id
          schema:
            type: string
            example: 58907809F0964E998D36C87F10EBA60C
        - name: groupId
          in: path
          required: true
          description: Identificador del grupo.
          schema:
            type: string
            example: 120363430328583007-group
      responses:
        '200':
          description: Enlace de invitación
          content:
            application/json:
              schema:
                type: object
                properties:
                  inviteLink:
                    type: string
              example:
                inviteLink: https://chat.whatsapp.com/XXXXXXXXXXX
        '400':
          description: Id de grupo fuera de formato
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: invalid_request
                field: groupId
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Grupo o canal no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                groupNotFound:
                  summary: Grupo no encontrado
                  value:
                    error: provider_error
                    message: Group not found
                instanceNotFound:
                  summary: Canal (instancia) no encontrado
                  value:
                    error: instance not found
        '422':
          description: >-
            El canal no es administrador del grupo, operación no disponible en
            el canal, instancia no aprovisionada, suscripción inactiva o
            workspace bloqueado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notGroupAdmin:
                  summary: El canal no es administrador del grupo
                  value:
                    error: provider_error
                    message: >-
                      The channel is not an admin of this group, so WhatsApp
                      does not return its invite link. Make the channel an admin
                      of the group, or ask a group admin for the link.
                operationNotSupported:
                  summary: Canal sin soporte de grupos en esta API
                  value:
                    error: operation not supported for this instance
                instanceNotProvisioned:
                  summary: Instancia no aprovisionada
                  value:
                    error: instance is not provisioned
                subscriptionInactive:
                  summary: Suscripción inactiva
                  value:
                    error: instance subscription is not active
                workspaceBlocked:
                  summary: Workspace bloqueado
                  value:
                    error: You are blocked, contact support.
                    message: >-
                      You are blocked, contact support. This workspace is
                      blocked on the platform, so sending, editing and group
                      calls are refused until it is unblocked. Talk to support
                      through the panel at https://app.omni.z-api.io.
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        field:
          type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: Secret Key ausente o inválida
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Authorization invalid
            message: >-
              Authorization invalid: the Authorization header is missing or
              empty. Send the workspace Secret Key as "Authorization: Bearer
              <secret-key>". See
              https://developer.omni.z-api.io/en/authentication
      headers:
        WWW-Authenticate:
          description: Siempre `Bearer`
          schema:
            type: string
          example: Bearer
    Forbidden:
      description: IP fuera de la lista de IPs del workspace
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: ip_not_allowed
            message: >-
              203.0.113.10 not allowed: this workspace only accepts API calls
              from the IPs on its allow list. The workspace Owner can add this
              IP under Administration > Security > IP Restriction in the panel
              (changes take up to 10 minutes to apply), or call from an allowed
              IP. See https://developer.omni.z-api.io/en/security/ip-restriction
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.