> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Use Invite Token > Uses an invite token to join a channel or room. This endpoint also checks whether the user is banned from the target room before allowing them to use the invite link. A banned user must be unbanned first before they can join via an invite token. ### Changelog | Version | Description | |---------|--------| | 8.4.0 | Added ban check — banned users can no longer join via invite token | ## OpenAPI ````json POST /api/v1/useInviteToken { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/useInviteToken": { "post": { "tags": [ "Room Invites" ], "summary": "Use Invite Token", "description": "Uses an invite token to join a channel or room.\n\nThis endpoint also checks whether the user is banned from the target room before\nallowing them to use the invite link. A banned user must be unbanned first\nbefore they can join via an invite token.\n\n### Changelog\n| Version | Description |\n|---------|--------|\n| 8.4.0 | Added ban check — banned users can no longer join via invite token |", "operationId": "post-useInviteToken", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "description": "The invite token to use." } }, "required": [ "token" ] }, "examples": { "Use Invite Token": { "value": { "token": "R4VDXJ9KJZB8M2QW" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "room": { "type": "object", "description": "The room information.", "properties": { "_id": { "type": "string" }, "name": { "type": "string" }, "topic": { "type": "string" } } }, "success": { "type": "boolean" } } }, "examples": { "Success Example": { "value": { "room": { "_id": "sN9KJZX2aX7aXqB2a", "name": "general", "topic": "General discussion" }, "success": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "User Is Banned": { "value": { "success": false, "error": "User is banned from this room", "errorType": "error-user-is-banned" } }, "Invalid Token": { "value": { "success": false, "error": "Invalid invite token", "errorType": "error-invalid-token" } }, "Token Expired": { "value": { "success": false, "error": "Invite token has expired", "errorType": "error-invite-token-expired" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } } } } ````