---
url: /apidocs/social_invitation_token.md
---
## Social: InvitationToken API

| Endpoint | Method | Description |
|-----|-----|-----|
| [social:createInvitationToken](#create-invitation-token) | websocket | Create invitation token |
| [social:getInvitationToken](#get-invitation-token) | websocket | Get invitation token |
| [social:listInvitationTokensCreatedByUser](#list-invitation-tokens-created-by-user) | websocket | List invitation tokens created by user |
| [social:revokeInvitationToken](#revoke-invitation-token) | websocket | Revoke invitation token |
| [social:redeemInvitationToken](#redeem-invitation-token) | websocket | Redeem invitation token |
| [social:listInvitationTokenUsages](#list-invitation-token-usages) | websocket | List invitation token usages |

### Create invitation token

**Method:** websocket

**Endpoint:** social:createInvitationToken

**Description:** Creates an invitation token that can be redeemed by other users to perform certain actions (e.g., join a room, join a group, etc.). The token can be created with specific sources (e.g., room, group) and client routes (e.g., room page, group page) to direct users to the appropriate place after redeeming the token. The token can also have an expiration time and can be revoked by the creator.

**Request:**

**Response:**

### Get invitation token

**Method:** websocket

**Endpoint:** social:getInvitationToken

**Request:**

**Response:**

### List invitation tokens created by user

**Method:** websocket

**Endpoint:** social:listInvitationTokensCreatedByUser

**Request:**

**Response:**

### Revoke invitation token

**Method:** websocket

**Endpoint:** social:revokeInvitationToken

**Request:**

**Response:**

### Redeem invitation token

**Method:** websocket

**Endpoint:** social:redeemInvitationToken

**Request:**

**Response:**

### List invitation token usages

**Method:** websocket

**Endpoint:** social:listInvitationTokenUsages

**Request:**

**Response:**
