> ## 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.
# Remove Custom OAuth
> Remove a custom OAuth integration from your workspace. All the `Accounts_OAuth_Custom--*` settings of the named service are deleted. This endpoint requires 2FA.
It replaces the deprecated `removeOAuthService` real-time method, which remains available until 9.0.0.
**Permission required**:
- `add-oauth-service`
### Changelog
| Version | Description |
| ---------------- | ------------|
|8.8.0 | Added |
## OpenAPI
````json POST /api/v1/settings.removeCustomOAuth
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Settings"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Settings"
},
{
"name": "Audit"
},
{
"name": "Cloud"
},
{
"name": "DNS"
},
{
"name": "E2E"
},
{
"name": "Import"
},
{
"name": "Bulk User Import"
},
{
"name": "Instances"
},
{
"name": "Federation"
},
{
"name": "Moderation"
},
{
"name": "Device Management"
},
{
"name": "Password policy"
},
{
"name": "Video Conference"
},
{
"name": "Media Calls"
}
],
"paths": {
"/api/v1/settings.removeCustomOAuth": {
"parameters": [],
"post": {
"description": "Remove a custom OAuth integration from your workspace. All the `Accounts_OAuth_Custom--*` settings of the named service are deleted. This endpoint requires 2FA.\n\nIt replaces the deprecated `removeOAuthService` real-time method, which remains available until 9.0.0.\n\n**Permission required**:\n- `add-oauth-service`\n\n### Changelog\n| Version | Description |\n| ---------------- | ------------|\n|8.8.0 | Added |",
"summary": "Remove Custom OAuth",
"operationId": "post-api-v1-settings.removeCustomOAuth",
"responses": {
"200": {
"$ref": "#/components/responses/trueSuccess"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Missing name param": {
"value": {
"success": "false",
"error": "The parameter \"name\" is required [error-name-param-not-provided]",
"errorType": "error-name-param-not-provided"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
}
},
"tags": [
"Settings"
],
"parameters": [
{
"$ref": "#/components/parameters/X-User-Id"
},
{
"$ref": "#/components/parameters/X-Auth-Token"
},
{
"$ref": "#/components/parameters/x-2fa-code"
},
{
"$ref": "#/components/parameters/X-2fa-method"
}
],
"requestBody": {
"required": "true",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the custom OAuth service that you want to remove.",
"example": "myProvider"
}
},
"required": [
"name"
],
"additionalProperties": "false"
},
"examples": {
"Example": {
"value": {
"name": "myProvider"
}
}
}
}
}
}
}
}
},
"components": {
"responses": {
"trueSuccess": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"success": "true"
}
}
}
}
}
},
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"status": "error",
"message": "You must be logged in to do this."
}
}
}
}
}
},
"forbiddenError": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Permission Error": {
"value": {
"success": "false",
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
}
}
}
}
}
},
"parameters": {
"X-User-Id": {
"name": "X-User-Id",
"in": "header",
"required": "true",
"schema": {
"type": "string"
},
"example": "CkCPNctrgCDfmWLqC",
"description": "The user ID."
},
"X-Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"required": "true",
"schema": {
"type": "string"
},
"example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE",
"description": "The authentication token."
},
"x-2fa-code": {
"name": "x-2fa-code",
"in": "header",
"schema": {
"type": "string"
},
"description": "The 2FA code. This parameter is required if 2FA is enabled in your workspace. See the Introduction to Two-Factor Authentication document for details."
},
"X-2fa-method": {
"name": "x-2fa-method",
"in": "header",
"schema": {
"type": "string"
},
"description": "Enter the method with which you get the 2FA code. It can be `email`, `totp`, or `password`. This parameter is required if 2FA is enabled in your workspace."
}
}
}
}
````