---
title: "GET /connections/{phoneNumber}/group-invite-code"
method: GET
path: "/connections/{phoneNumber}/group-invite-code"
tags: ["Connections"]
---

# GET /connections/{phoneNumber}/group-invite-code

`GET /connections/{phoneNumber}/group-invite-code`

Get the invite code for a group

## Path parameters

- `phoneNumber` string, required

## Query parameters

- `jid` string, required

## Response `200`

Invite code retrieved successfully

- object
  - `data` object
    - `jid` string
    - `inviteCode` string, nullable

## Other responses

- `403` — Forbidden — the API key does not own this connection. Returned when a connection is bound to a different API key.
- `421` — Misdirected Request — in cluster mode, this instance does not own the connection. The owning instance id is in the x-baileys-owner header; a proxy re-routes the request there. Not returned for the explicit-takeover routes: POST /connections/{phoneNumber}, /import-session and /restart.

## Changes

- **2026-08-15** `533b3360e2e4` — 4 breaking, 44 warning, 4 info
  - the response property `data` became optional for the status `200`
  - removed the required property `data/key` from the response with the `200` status
  - removed the required property `data/messageTimestamp` from the response with the `200` status
  - removed the success response with the status `202`
  - …48 more
- **2026-08-15** `80b5396ef493` — 2 info
  - added the non-success response with the status `422`
  - added the success response with the status `202`
- **2026-06-16** `da89554d2e38` — 13 info
  - added the non-success response with the status `409`
  - added the non-success response with the status `421`
  - added the optional property `data/capping_status` to the response with the `200` status
  - added the optional property `data/cycle_end_timestamp` to the response with the `200` status
  - …9 more
- **2026-03-20** `8632adf0286b` — 1 info
  - endpoint added
- **2025-05-10** `02cbe6b8238e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/changes/connections/:phoneNumber/group-invite-code/get.md)

---

[API](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api.md) · [All operations](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fazer-ai/fazer-ai-baileys-api/revisions/5299037901a9/schema)
