Chat

Enable a Chat Group Invite Link

Changed on

Turns on the invite link for an encrypted Chat group conversation and returns the link details. The client builds the link and sends it as invite_url, in the form https://x.com/i/chat/group_join/<conversation_id>/<token>, where the token is exactly 10 letters, digits, '-' or '_'. invite_url is required when action_signatures is sent. To make the link expire, send validity_duration_msec or validity_expiry_timestamp_msec. With action_signatures, send validity_expiry_timestamp_msec, because the signed payload carries the expiry. The group name and avatar sent here are stored unencrypted and shown to anyone who opens the link.

post/2/chat/conversations/{id}/invite

Request

  • Base URL
    https://api.x.com
  • URL
    https://api.x.com/2/chat/conversations/{id}/invite
  • Auth
    • OAuth 2
      Authorization code: https://api.x.com/2/oauth2/authorize
      Token URL: https://api.x.com/2/oauth2/token scopes: dm.write, tweet.read, users.read
    • or HTTP oauth

Path parameters

idstring required

The ID of the group conversation, starting with g.

Request body

affiliate_user_idstring

ID of the affiliate account to associate with the link.

decrypted_avatar_urlstring

Group avatar URL (https) to show on the invite preview.

decrypted_titlestring

Group name to show on the invite preview.

invite_urlstring

Invite link built by the client, in the form https://x.com/i/chat/group_join/<conversation_id>/<token>, where the token is exactly 10 letters, digits, '-' or '_'. The conversation segment must match the path ID. It is part of the signed payload, so it is required when action_signatures is sent.

validity_duration_msecstring

How long the link stays valid, in milliseconds, from the time of the request. With action_signatures, send validity_expiry_timestamp_msec instead.

validity_expiry_timestamp_msecstring

When the link expires, in epoch milliseconds. Must be in the future. If validity_duration_msec is also sent, the two must agree within a minute.

welcome_messagestring

Message shown to people who open the link.

Response

The request has succeeded.

Changes

    • breaking

      added to the response body oneOf list for the response status

    • breaking

      added to the / response property oneOf list for the response status

    • info

      added https://api.x.com/2/problems/dm-bad-attachment https://api.x.com/2/problems/dm-bad-cta https://api.x.com/2/problems/dm-bad-custom-profile https://api.x.com/2/problems/dm-bad-media https://api.x.com/2/problems/dm-bad-quick-reply https://api.x.com/2/problems/dm-bad-url https://api.x.com/2/problems/dm-conversation-name-too-long https://api.x.com/2/problems/dm-conversation-not-found https://api.x.com/2/problems/dm-duplicate https://api.x.com/2/problems/dm-inactive-device https://api.x.com/2/problems/dm-not-delivered https://api.x.com/2/problems/dm-not-found https://api.x.com/2/problems/dm-not-owner https://api.x.com/2/problems/dm-participant-not-added https://api.x.com/2/problems/dm-participant-not-found https://api.x.com/2/problems/dm-participant-restricted https://api.x.com/2/problems/dm-participant-unavailable https://api.x.com/2/problems/dm-rate-limited https://api.x.com/2/problems/dm-recipient-blocks-sender https://api.x.com/2/problems/dm-recipient-cannot-receive https://api.x.com/2/problems/dm-recipient-encrypted-unavailable https://api.x.com/2/problems/dm-recipient-not-accepting https://api.x.com/2/problems/dm-recipient-not-found https://api.x.com/2/problems/dm-recipient-restricts-groups https://api.x.com/2/problems/dm-recipient-unavailable https://api.x.com/2/problems/dm-request-in-progress https://api.x.com/2/problems/dm-safety-limited https://api.x.com/2/problems/dm-safety-rejected https://api.x.com/2/problems/dm-sender-blocks-recipient https://api.x.com/2/problems/dm-sender-declined-dms https://api.x.com/2/problems/dm-sender-dms-closed https://api.x.com/2/problems/dm-sender-encrypted-unavailable https://api.x.com/2/problems/dm-sender-not-in-conversation https://api.x.com/2/problems/dm-sender-not-permitted https://api.x.com/2/problems/dm-sender-not-verified https://api.x.com/2/problems/dm-sender-phone-required https://api.x.com/2/problems/dm-sender-read-only https://api.x.com/2/problems/dm-sender-unavailable https://api.x.com/2/problems/dm-text-empty https://api.x.com/2/problems/dm-text-too-long https://api.x.com/2/problems/dm-too-few-participants https://api.x.com/2/problems/dm-too-many-participants https://api.x.com/2/problems/dm-unsupported-message mapping keys to the response discriminator for the response status

    • info

      added https://api.x.com/2/problems/dm-bad-attachment https://api.x.com/2/problems/dm-bad-cta https://api.x.com/2/problems/dm-bad-custom-profile https://api.x.com/2/problems/dm-bad-media https://api.x.com/2/problems/dm-bad-quick-reply https://api.x.com/2/problems/dm-bad-url https://api.x.com/2/problems/dm-conversation-name-too-long https://api.x.com/2/problems/dm-conversation-not-found https://api.x.com/2/problems/dm-duplicate https://api.x.com/2/problems/dm-inactive-device https://api.x.com/2/problems/dm-not-delivered https://api.x.com/2/problems/dm-not-found https://api.x.com/2/problems/dm-not-owner https://api.x.com/2/problems/dm-participant-not-added https://api.x.com/2/problems/dm-participant-not-found https://api.x.com/2/problems/dm-participant-restricted https://api.x.com/2/problems/dm-participant-unavailable https://api.x.com/2/problems/dm-rate-limited https://api.x.com/2/problems/dm-recipient-blocks-sender https://api.x.com/2/problems/dm-recipient-cannot-receive https://api.x.com/2/problems/dm-recipient-encrypted-unavailable https://api.x.com/2/problems/dm-recipient-not-accepting https://api.x.com/2/problems/dm-recipient-not-found https://api.x.com/2/problems/dm-recipient-restricts-groups https://api.x.com/2/problems/dm-recipient-unavailable https://api.x.com/2/problems/dm-request-in-progress https://api.x.com/2/problems/dm-safety-limited https://api.x.com/2/problems/dm-safety-rejected https://api.x.com/2/problems/dm-sender-blocks-recipient https://api.x.com/2/problems/dm-sender-declined-dms https://api.x.com/2/problems/dm-sender-dms-closed https://api.x.com/2/problems/dm-sender-encrypted-unavailable https://api.x.com/2/problems/dm-sender-not-in-conversation https://api.x.com/2/problems/dm-sender-not-permitted https://api.x.com/2/problems/dm-sender-not-verified https://api.x.com/2/problems/dm-sender-phone-required https://api.x.com/2/problems/dm-sender-read-only https://api.x.com/2/problems/dm-sender-unavailable https://api.x.com/2/problems/dm-text-empty https://api.x.com/2/problems/dm-text-too-long https://api.x.com/2/problems/dm-too-few-participants https://api.x.com/2/problems/dm-too-many-participants https://api.x.com/2/problems/dm-unsupported-message discriminator mapping keys to the / response property for the response status

    • info

      endpoint added