Group channel

Accept an invitation

Changed on

Accept an invitation

Accepts an invitation from a group channel for a user to join. A single user may join up to 2,000 group channels, and any invitation to a user who is at capacity will be automatically canceled. See this page to learn more about channel types.

Note: This action is only available when the auto_accept property of an application is set to false. You can change the value of the property using the update default channel invitation preference action, or the update channel invitation preference action.

https://sendbird.com/docs/chat/platform-api/v3/channel/inviting-a-user/accept-an-invitation-channel#1-accept-an-invitation

put/v3/group_channels/{channel_url}/accept

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Path parameters

channel_urlstring required

(Required)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

access_codestring nullable
user_idstring required

Response

Successful response

channel_urlstring required
cover_urlstring
created_atinteger
custom_typestring
datastring
delivery_receiptobject
freezeboolean
has_ai_botboolean
has_botboolean
idinteger
ignore_profanity_filterboolean
is_access_code_requiredboolean
is_broadcastboolean
is_discoverableboolean
is_distinctboolean
is_ephemeralboolean
is_publicboolean
is_superboolean
joined_member_countinteger
max_length_messageinteger
member_countinteger
message_survival_secondsinteger
namestring
read_receiptobject
unread_mention_countinteger
unread_message_countinteger

Example response

{
  "data": "data",
  "custom_type": "custom_type",
  "channel": {
    "cover_url": "cover_url",
    "data": "data",
    "custom_type": "custom_type",
    "max_length_message": 6,
    "name": "name",
    "created_at": 0,
    "member_count": 1,
    "channel_url": "channel_url"
  },
  "disappearing_message": {
    "is_triggered_by_message_read": true,
    "message_survival_seconds": 6
  },
  "created_at": 5,
  "is_super": true,
  "last_message": {
    "data": "data",
    "message_events": {
      "update_last_message": true,
      "update_mention_count": true,
      "send_push_notification": "send_push_notification",
      "update_unread_count": true
    },
    "custom_type": "custom_type",
    "is_reply_to_channel": true,
    "created_at": 7,
    "is_removed": true,
    "type": "type",
    "req_id": "req_id",
    "file": "{}",
    "updated_at": 3,
    "translations": "{}",
    "thread_info": "{}",
    "mentioned_users": [
      {
        "metadata": "{}",
        "require_auth_for_profile_image": true,
        "is_active": true,
        "role": "",
        "user_id": "user_id",
        "profile_url": "profile_url",
        "nickname": "nickname",
        "is_blocked_by_me": true
      },
      {
        "metadata": "{}",
        "require_auth_for_profile_image": true,
        "is_active": true,
        "role": "",
        "user_id": "user_id",
        "profile_url": "profile_url",
        "nickname": "nickname",
        "is_blocked_by_me": true
      }
    ],
    "channel_type": "channel_type",
    "message_survival_seconds": 9,
    "silent": true,
    "parent_message_id": 4,
    "parent_message_info": {
      "file": {
        "file_name": "file_name",
        "file_type": "file_type",
        "require_auth": true,
        "thumbnails": [
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          },
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          }
        ],
        "url": "url",
        "file_size": 4
      },
      "custom_type": "custom_type",
      "files": [
        {
          "file_name": "file_name",
          "file_type": "file_type",
          "require_auth": true,
          "thumbnails": [
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            },
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            }
          ],
          "url": "url",
          "file_size": 4
        },
        {
          "file_name": "file_name",
          "file_type": "file_type",
          "require_auth": true,
          "thumbnails": [
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            },
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            }
          ],
          "url": "url",
          "file_size": 4
        }
      ],
      "message": "message",
      "type": "type",
      "user": {
        "metadata": "{}",
        "is_active": true,
        "preferred_languages": [
          "preferred_languages",
          "preferred_languages"
        ],
        "require_auth_for_profile_image": true,
        "unread_channel_count": 6,
        "discovery_keys": [
          "discovery_keys",
          "discovery_keys"
        ],
        "profile_url": "profile_url",
        "is_created": true,
        "created_at": 9,
        "has_ever_logged_in": true,
        "locale": "locale",
        "unread_message_count": 8,
        "access_token": "access_token",
        "is_shadow_blocked": true,
        "user_id": "user_id",
        "nickname": "nickname",
        "phone_number": "phone_number",
        "is_online": true,
        "state": "",
        "is_hide_me_from_friends": true,
        "last_seen_at": 9
      },
      "ts": 5
    },
    "require_auth": true,
    "message_id": 1,
    "sorted_metaarray": [
      {
        "value": [
          "value",
          "value"
        ],
        "key": "key"
      },
      {
        "value": [
          "value",
          "value"
        ],
        "key": "key"
      }
    ],
    "mention_type": "mention_type",
    "message": "message",
    "channel_url": "channel_url",
    "is_op_msg": true,
    "message_retention_hour": 6,
    "extended_message_payload": null,
    "files": [
      {
        "file_name": "file_name",
        "file_type": "file_type",
        "require_auth": true,
        "thumbnails": [
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          },
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          }
        ],
        "url": "url",
        "file_size": 4
      },
      {
        "file_name": "file_name",
        "file_type": "file_type",
        "require_auth": true,
        "thumbnails": [
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          },
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          }
        ],
        "url": "url",
        "file_size": 4
      }
    ],
    "reactions": [
      {
        "updated_at": 2,
        "user_ids": [
          "user_ids",
          "user_ids"
        ],
        "key": "key"
      },
      {
        "updated_at": 2,
        "user_ids": [
          "user_ids",
          "user_ids"
        ],
        "key": "key"
      }
    ],
    "user": {
      "metadata": "{}",
      "require_auth_for_profile_image": true,
      "is_active": true,
      "role": "",
      "user_id": "user_id",
      "profile_url": "profile_url",
      "nickname": "nickname",
      "is_blocked_by_me": true
    }
  },
  "is_discoverable": true,
  "joined_member_count": 7,
  "freeze": true,
  "is_distinct": true,
  "operators": [
    {
      "metadata": "{}",
      "is_active": true,
      "preferred_languages": [
        "preferred_languages",
        "preferred_languages"
      ],
      "require_auth_for_profile_image": true,
      "unread_channel_count": 6,
      "discovery_keys": [
        "discovery_keys",
        "discovery_keys"
      ],
      "profile_url": "profile_url",
      "is_created": true,
      "created_at": 9,
      "has_ever_logged_in": true,
      "locale": "locale",
      "unread_message_count": 8,
      "access_token": "access_token",
      "is_shadow_blocked": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "phone_number": "phone_number",
      "is_online": true,
      "state": "",
      "is_hide_me_from_friends": true,
      "last_seen_at": 9
    },
    {
      "metadata": "{}",
      "is_active": true,
      "preferred_languages": [
        "preferred_languages",
        "preferred_languages"
      ],
      "require_auth_for_profile_image": true,
      "unread_channel_count": 6,
      "discovery_keys": [
        "discovery_keys",
        "discovery_keys"
      ],
      "profile_url": "profile_url",
      "is_created": true,
      "created_at": 9,
      "has_ever_logged_in": true,
      "locale": "locale",
      "unread_message_count": 8,
      "access_token": "access_token",
      "is_shadow_blocked": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "phone_number": "phone_number",
      "is_online": true,
      "state": "",
      "is_hide_me_from_friends": true,
      "last_seen_at": 9
    }
  ],
  "members": [
    {
      "metadata": "{}",
      "is_active": true,
      "is_blocking_me": true,
      "require_auth_for_profile_image": true,
      "role": "",
      "profile_url": "profile_url",
      "muted_end_at": 2,
      "delivered_ts": 9,
      "do_not_disturb": true,
      "is_muted": true,
      "read_ts": 4,
      "is_blocked_by_me": true,
      "friend_name": "friend_name",
      "friend_discovery_key": [
        "friend_discovery_key",
        "friend_discovery_key"
      ],
      "muted_description": "muted_description",
      "push_enabled": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "is_online": true,
      "push_trigger_option": null,
      "state": "",
      "last_seen_at": 3
    },
    {
      "metadata": "{}",
      "is_active": true,
      "is_blocking_me": true,
      "require_auth_for_profile_image": true,
      "role": "",
      "profile_url": "profile_url",
      "muted_end_at": 2,
      "delivered_ts": 9,
      "do_not_disturb": true,
      "is_muted": true,
      "read_ts": 4,
      "is_blocked_by_me": true,
      "friend_name": "friend_name",
      "friend_discovery_key": [
        "friend_discovery_key",
        "friend_discovery_key"
      ],
      "muted_description": "muted_description",
      "push_enabled": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "is_online": true,
      "push_trigger_option": null,
      "state": "",
      "last_seen_at": 3
    }
  ],
  "max_length_message": 9,
  "id": 2,
  "member_count": 6,
  "message_survival_seconds": 3,
  "has_ai_bot": true,
  "cover_url": "cover_url",
  "is_ephemeral": true,
  "unread_mention_count": 1,
  "created_by": {
    "metadata": "{}",
    "require_auth_for_profile_image": true,
    "is_active": true,
    "role": "",
    "user_id": "user_id",
    "profile_url": "profile_url",
    "nickname": "nickname",
    "is_blocked_by_me": true
  },
  "has_bot": true,
  "unread_message_count": 2,
  "channel_url": "channel_url",
  "is_broadcast": true,
  "is_public": true,
  "name": "name",
  "read_receipt": {
    "key": 6
  },
  "sms_fallback": {
    "exclude_user_ids": [
      "exclude_user_ids",
      "exclude_user_ids"
    ],
    "wait_seconds": 1
  },
  "ignore_profanity_filter": true,
  "delivery_receipt": {
    "key": 5
  },
  "is_access_code_required": true
}

Changes

    • info

      the request property became nullable

    • warning

      deleted the header request parameter Api-Token

    • warning

      removed the request property

    • info

      api operation id gcAcceptInvitation removed and replaced with acceptAnInvitation

    • info

      added the new optional header request parameter api-token

    • info

      the request property became optional