> ## 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. # Get Remaining TOTP Codes > Returns how many backup codes are left for the authenticator app (TOTP) two-factor authentication of your own account. Requests are limited to five per minute. This endpoint replaces the deprecated `2fa:checkCodesRemaining` real-time method, which remains available until 9.0.0. ### Changelog | Version | Description | | ------- | ----------- | | 8.8.0 | Added | ## OpenAPI ````json GET /api/v1/users.totpCodesRemaining { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Authentication" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Authentication" }, { "name": "Two-Factor Authentication" } ], "paths": { "/api/v1/users.totpCodesRemaining": { "get": { "tags": [ "Two-Factor Authentication" ], "summary": "Get Remaining TOTP Codes", "description": "Returns how many backup codes are left for the authenticator app (TOTP) two-factor authentication of your own account. Requests are limited to five per minute.\n\nThis endpoint replaces the deprecated `2fa:checkCodesRemaining` real-time method, which remains available until 9.0.0.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.8.0 | Added |", "operationId": "get-api-v1-users.totpCodesRemaining", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "remaining": { "type": "number" }, "success": { "type": "boolean" } }, "required": [ "remaining", "success" ], "additionalProperties": "false" }, "examples": { "Success Example": { "value": { "remaining": "8", "success": "true" } } } } } }, "400": { "description": "TOTP two-factor authentication is not enabled for the user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "TOTP not enabled": { "value": { "success": "false", "error": "[invalid-totp]", "errorType": "invalid-totp" } } } } } }, "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": { "status": { "type": "string" }, "message": { "type": "string" } }, "x-examples": { "Authorization Error": { "status": "error", "message": "You must be logged in to do this." } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````